/ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * 
 
     M o d u l e :   A W I N - C A P I . T X T 
 
                     A l l   c o m m a n d s   f o r   P P L A   i n   D y n a m i c   L i n k   L i b r a r y   f o r   W i n d o w s 
 
     N o t i c e s :   C o p y r i g h t   ( c )   1 9 9 8 - 2 0 1 3   A R G O X 
 
 * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * / 
 
     v
 
 = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = 
 
 ( 0 1 ) A _ B a r 2 d _ M a x i ( )                             = >   pSQ NP  M a x i   C o d e   2 D   B a r c o d e 0
 
 ( 0 2 ) A _ B a r 2 d _ M a x i _ O r i ( )                     = >   pSQ NP  M a x i   C o d e   2 D   B a r c o d e +TeI҉^0
 
 ( 0 3 ) A _ B a r 2 d _ P D F 4 1 7 ( )                         = >   pSQ NP  P D F - 4 1 7   2 D   B a r c o d e 0
 
 ( 0 4 ) A _ B a r 2 d _ P D F 4 1 7 _ O r i ( )                 = >   pSQ NP  P D F - 4 1 7   2 D   B a r c o d e +TeI҉^0
 
 ( 0 5 ) A _ B a r 2 d _ D a t a M a t r i x ( )                 = >   pSQ NP  D a t a M a t r i x   2 D   B a r c o d e 
 
 ( 0 6 ) A _ C l e a r _ M e m o r y ( )                         = >   nd  P r i n t e r   gQ  F l a s h   M e m o r y   vǌe0
 
 ( 0 7 ) A _ C l o s e P r n ( )                                 = >   ܕ  P r i n t e r   ]\O0
 
 ( 0 8 ) A _ C r e a t e P r n ( )                               = >   _U  P r i n t e r   ]\O0
 
 ( 0 9 ) A _ D e l _ G r a p h i c ( )                           = >   *Rd2QX[(WpSh_j  R A M   b  F l a s h   M e m o r y   gQvWb_0
 
 ( 1 0 ) A _ D r a w _ B o x ( )                                 = >   ku NPFh0
 
 ( 1 1 ) A _ D r a w _ L i n e ( )                               = >   ku Nh}0
 
 ( 1 2 ) A _ F e e d _ L a b e l ( )                             = >    N5_jd|0
 
 ( 1 3 ) A _ G e t _ D L L _ V e r s i o n ( )                   = >   S_byQdkQxe^Hr,gǌ
0
 
 ( 1 4 ) A _ G e t _ D L L _ V e r s i o n A ( )                 = >   S_byQdkQxe^Hr,gǌ
0
 
 ( 1 5 ) A _ G e t _ G r a p h i c ( )                           = >   RpS NPWb_&N\Wb_2QX[(WpSh_jgQv  R A M   b  F l a s h   M e m o r y 0
 
 ( 1 6 ) A _ G e t _ G r a p h i c _ C o l o r B M P ( )         = >   Ic  B M P   Wji_rpp&N\Wb_2QX[(WpSh_jgQv  R A M   b  F l a s h   M e m o r y 0
 
 ( 1 7 ) A _ I n i t i a l _ S e t t i n g ( )                   = >   MRnUt0
 
 ( 1 8 ) A _ L o a d _ G r a p h i c ( )                         = >   RpS NPWb_0
 
 ( 1 9 ) A _ O p e n _ C h i n e s e F o n t ( )                 = >   _UO(u-NeޞwcW[WjHh  ( 1 6 * 1 5   T  2 4 * 2 4 ) 0
 
 ( 2 0 ) A _ P r i n t _ F o r m ( )                             = >   RpS NP  F O R M   ( h<h) &N8eQ  F O R M   v
T1z&N-[
 
                                                                       [SؚvkOT_!kxeRpSNxe0
 
 ( 2 1 ) A _ P r i n t _ O u t ( )                               = >   8Q@b	gǌe&N-[[SؚvkOT_!kxeRpSNxe0
 
 ( 2 2 ) A _ P r n _ B a r c o d e ( )                           = >   pSQ NPhx0
 
 ( 2 3 ) A _ P r n _ T e x t ( )                                 = >   pSQ NLeW[0
 
 ( 2 4 ) A _ P r n _ T e x t _ C h i n e s e ( )                 = >   pSQ NLeW[O(u-NeޞwcW[WjHh  ( 1 6 * 1 5   b  2 4 * 2 4 ) 0
 
 ( 2 5 ) A _ P r n _ T e x t _ T r u e T y p e ( )               = >   pSQ NL  T r u e   T y p e   F o n t   eW[0
 
 ( 2 6 ) A _ P r n _ T e x t _ T r u e T y p e _ W ( )           = >   pSQ NL  T r u e   T y p e   F o n t   eW[&Nc6RW[Wv[Sؚ0
 
 ( 2 7 ) A _ S e t _ B a c k f e e d ( )                         = >   jd|V6e\PbkMOn0
 
 ( 2 8 ) A _ S e t _ B M P S a v e ( )                           = >   2QX[q_PWj0
 
 ( 2 9 ) A _ S e t _ C u t t i n g ( )                           = >   -[c[pSQ~^5__R RR N!k0
 
 ( 3 0 ) A _ S e t _ D a r k n e s s ( )                         = >   -[qa-RpSq^0
 
 ( 3 1 ) A _ S e t _ D e b u g D i a l o g ( )                   = >   -[d/tX0
 
 ( 3 2 ) A _ S e t _ F e e d ( )                                 = >   -[jd|}Qv^0
 
 ( 3 3 ) A _ S e t _ F o r m ( )                                 = >   2QX[&NRpS  F O R M   ( h<h) 0
 
 ( 3 4 ) A _ S e t _ M a r g i n ( )                             = >   -[YRpSMOnT]zz}vzz0
 
 ( 3 5 ) A _ S e t _ P r n c o m p o r t ( )                     = >   -[pSh_j^RW0
 
 ( 3 6 ) A _ S e t _ P r n c o m p o r t _ P C ( )               = >   -[  P C   ^RW0
 
 ( 3 7 ) A _ S e t _ S e n s o r _ M o d e ( )                   = >   -[  S E N S O R   !j_b#~}!j_0
 
 ( 3 8 ) A _ S e t _ S p e e d ( )                               = >   -[RpS^0
 
 ( 3 9 ) A _ S e t _ S y s s e t t i n g ( )                     = >   -[IpS!j_0_UR  C u t t e r   b  P e e l 0-[jd| gw
 
                                                                       vw^09e  s l a s h   z e r o   p  n o r m a l   z e r o 0-[kpS
 
                                                                        N5_f\P N!k0
 
 ( 4 0 ) A _ S e t _ U n i t ( )                                 = >   -[^ϑUMOpTblQS0
 
 ( 4 1 ) A _ S e t _ G a p ( )                                   = >   -[  G a p   w^0
 
 ( 4 2 ) A _ S e t _ L o g i c ( )                               = >   -[S}vR0
 
 ( 4 3 ) A _ S e t _ P r o c e s s D l g ( )                     = >   _Ubܕ2^
\qFh0
 
 ( 4 4 ) A _ S e t _ L a b e l V e r ( )                         = >   -[}5_[^  ( F o r   R 4 0 0 ) 0
 
 ( 4 5 ) A _ G e t U S B B u f f e r L e n ( )                   = >   gb  U S B   Wǌew^0
 
 ( 4 6 ) A _ E n u m U S B ( )                                   = >   S_  U S B   Wvǌe0
 
 ( 4 7 ) A _ C r e a t e U S B P o r t ( )                       = >   O(u  U S B   W2LP80
 
 ( 4 8 ) A _ C r e a t e P o r t ( )                             = >   _UP8W2LP80
 
 ( 4 9 ) A _ C l e a r _ M e m o r y E x ( )                     = >   c[nd  P r i n t e r   gQ  R A M   b  F l a s h   M e m o r y   vǌe0
 
 ( 5 0 ) A _ S e t _ M i r r o r ( )                             = >   _Ubܕ\!j_0
 
 ( 5 1 ) A _ B a r 2 d _ R S S ( )                               = >   RpS  R S S   hx0
 
 ( 5 2 ) A _ B a r 2 d _ Q R _ M ( )                             = >   RpS  Q R   hx  ( KbR!j_) 0
 
 ( 5 3 ) A _ B a r 2 d _ Q R _ A ( )                             = >   RpS  Q R   hx  ( R!j_) 0
 
 ( 5 4 ) A _ G e t N e t P r i n t e r B u f f e r L e n ( )     = >   gb  N e t   P r i n t e r vǌew^0
 
 ( 5 5 ) A _ E n u m N e t P r i n t e r ( )                     = >   S_  N e t   P r i n t e r vǌe0
 
 ( 5 6 ) A _ C r e a t e N e t P o r t ( )                       = >   O(u  N e t   W2LP80      
 
 ( 5 7 ) A _ P r n _ T e x t _ T r u e T y p e _ U n i ( )       = >   pSQ NL1uU n i c o d e }xeW[@bIbv  T r u e   T y p e   F o n t   eW[0
 
 ( 5 8 ) A _ P r n _ T e x t _ T r u e T y p e _ U n i B ( )     = >   pSQ NL1uU n i c o d e }xeW[@bIbv  T r u e   T y p e   F o n t   eW[0
 
 ( 5 9 ) A _ G e t U S B D e v i c e I n f o ( )                 = >   S_  U S B   Wv݈n
T1zT݈n_0
 
 ( 6 0 ) A _ G e t _ G r a p h i c _ C o l o r B M P E x ( )     = >   Ic  B M P   Wji_rpp&N\Wb_2QX[(WpSh_jgQv  
 
                                                                       R A M   b  F l a s h   M e m o r y 0
 
 ( 6 1 ) A _ G e t _ G r a p h i c _ C o l o r B M P _ H B i t m a p ( )   = >   Ic  B M P   Wji_rpp&N\Wb_2QX[(WpSh_jgQv  
 
                                                                                 R A M   b  F l a s h   M e m o r y 0
 
 ( 6 2 ) A _ W r i t e D a t a ( )                               = >   (uOzsS\ǌePQbfBf[eQfX[@S-N0
 
 ( 6 3 ) A _ R e a d D a t a ( )                                 = >   S_pSh_j-Nvǌe0
 
 ( 6 4 ) A _ S e t _ E n c r y p t i o n K e y ( )               = >   -[R[pSv<P0
 
 ( 6 5 ) A _ C h e c k _ E n c r y p t i o n K e y ( )           = >   xR[pSvckx'`0
 
 ( 6 6 ) A _ S e t _ E r r o r D l g ( )                         = >   _Ubܕ͑fbOUz0
 
 ( 6 7 ) A _ S e t _ C o m m T i m e o u t ( )                   = >   -[OvBf. 
 
 ( 6 8 ) A _ G e t _ C o m m T i m e o u t ( )                   = >   S_OvBf. 
 
 ( 6 9 ) A _ S e t _ L a b e l F o r S m a r t P r i n t ( )     = >   -[  S m a r t   P r i n t   -N@b vǌ
. 
 
 
 
 * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * 
 
     laN
 
 = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = 
 
 1 . `Oar\D L L jHh>en(WTRQ? 
 
     O(u3 2 MOCQvD L L : 
 
     A . \D L L jHhTa(uz_>e(WT NvN. ( /f g}Yvel) 
 
     B . (WW i n d o w s   3 2 MOCQ\Omi|q}-N,   \D L L jHh>en(W\ W i n d o w s \ S y s t e m 3 2 v. 
 
     C . (WW i n d o w s   6 4 MOCQ\Omi|q}-N,   \D L L jHh>en(W\ W i n d o w s \ S y s w o w 6 4 v. 
 
     O(u6 4 MOCQvD L L : 
 
     A . \D L L jHhTa(uz_>e(WT NvN. ( /f g}Yvel) 
 
     B . (WW i n d o w s   3 2 MOCQ\Omi|q}-N,   !qlO(u  6 4 MOCQvD L L . 
 
     C . (WW i n d o w s   6 4 MOCQ\Omi|q}-N,   \D L L jHh>en(W\ W i n d o w s \ S y s w o w 3 2 v. 
 
 2 . NN{Op  V i s u a l   C + +   S  V i s u a l   B a s i c   v{O, vQNz_ 
N N[[hQvT0
 
 
 
 * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * 
 
 A _ G e t U S B B u f f e r L e n ( ) 
 
 A _ E n u m U S B ( ) 
 
 = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = 
 
 R  S_  U S B   P r i n t e r   v݈n
T1zSǌew^0
 
 
 
 l
 
     V C : 
 
         i n t   A _ G e t U S B B u f f e r L e n ( v o i d ) ; 
 
         i n t   A _ E n u m U S B ( c h a r   * b u f ) ; 
 
     V B :   V B A : 
 
         D e c l a r e   F u n c t i o n   A _ G e t U S B B u f f e r L e n ( )   A s   L o n g 
 
         D e c l a r e   F u n c t i o n   A _ E n u m U S B ( B y V a l   b u f   A s   S t r i n g )   A s   L o n g 
 
     V B . n e t : 
 
         D e c l a r e   F u n c t i o n   A _ G e t U S B B u f f e r L e n ( )   A s   I n t e g e r 
 
         D e c l a r e   F u n c t i o n   A _ E n u m U S B ( B y V a l   b u f   A s   B y t e ( ) )   A s   I n t e g e r 
 
 
 
 Sxe
 
         b u f ; 
 
             2QX[  U S B   P r i n t e r   ǌe0
 
 
 
 PV<P
 
         A _ G e t U S B B u f f e r L e n ( ) ;     PV  U S B   P r i n t e r vǌew^. 
 
         A _ E n u m U S B ( ) ;     0   - >   O K . 
 
         R e f e r e n c e   A W - E r r o r . t x t   f i l e . 
 
 
 
 {O
 
     V C : 
 
         c h a r   * p b u f ; 
 
         i n t   n L e n   =   A _ G e t U S B B u f f e r L e n ( )   +   1 ; 
 
         i f   ( n L e n   >   1 )   { 
 
             p b u f   =   ( c h a r   * ) n e w   c h a r [ n L e n ] ; 
 
             A _ E n u m U S B ( p b u f ) ; 
 
         } 
 
     V B :   V B A : 
 
         D i m   n L e n   A s   L o n g 
 
         D i m   p b u f   A s   S t r i n g 
 
         n L e n   =   A _ G e t U S B B u f f e r L e n ( )   +   1 
 
         I f   n L e n   >   1   T h e n 
 
             p b u f   =   S p a c e ( 1 2 8 ) 
 
             C a l l   A _ E n u m U S B ( p b u f ) 
 
         E n d   I f 
 
     V B . n e t : 
 
         D i m   n L e n   A s   I n t e g e r 
 
         D i m   p b u f ( 1 2 8 )   A s   B y t e 
 
         n L e n   =   A _ G e t U S B B u f f e r L e n ( )   +   1 
 
         I f   n L e n   >   1   T h e n 
 
             C a l l   A _ E n u m U S B ( p b u f ) 
 
         E n d   I f 
 
         
 
 f    iQPQxe/f ND}vQxe0HQ(u  A _ G e t U S B B u f f e r L e n ( )   S_  U S B   P8Wvǌe
 
         w^,   6q_QMaԚf}  A _ E n u m U S B ( )   2QX[  U S B   Wvǌe0U S B   Wvǌe/fN
 
         ( " 0 x 0 d 0 x 0 a " ) ZPR, 	OO,   Ygǌe/f  A - 2 0 0 ( 0 x 0 d ) ( 0 x 0 a ) R - 4 0 0 Z I P vqh:y  
 
         U S B 1   /fc  A - 2 0 0 ,   U S B 2   /fc  R - 4 0 0 Z i p 0
 
 
 
 * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * 
 
 A _ G e t U S B D e v i c e I n f o ( ) 
 
 = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = 
 
 R  S_  U S B   P r i n t e r v݈n
T1zT݈n_0
 
 
 
 l
 
     V C : 
 
         i n t   A _ G e t U S B D e v i c e I n f o ( i n t   n P o r t ,   c h a r   * p D e v i c e N a m e ,   i n t   * p D e v i c e N a m e L e n ,   
 
             c h a r   * p D e v i c e P a t h ,   i n t   * p D e v i c e P a t h L e n ) ; 
 
     V B :   V B A : 
 
         D e c l a r e   F u n c t i o n   A _ G e t U S B D e v i c e I n f o ( B y V a l   n P o r t   A s   L o n g ,   _ 
 
             B y V a l   p D e v i c e N a m e   A s   S t r i n g ,   B y R e f   p D e v i c e N a m e L e n   A s   L o n g ,   _ 
 
             B y V a l   p D e v i c e P a t h   A s   S t r i n g ,   B y R e f   p D e v i c e P a t h L e n   A s   L o n g )   A s   L o n g 
 
     V B . n e t : 
 
         D e c l a r e   F u n c t i o n   A _ G e t U S B D e v i c e I n f o ( B y V a l   n P o r t   A s   I n t e g e r ,   _ 
 
             B y V a l   p D e v i c e N a m e   A s   B y t e ( ) ,   B y R e f   p D e v i c e N a m e L e n   A s   I n t e g e r ,   _ 
 
             B y V a l   p D e v i c e P a t h   A s   B y t e ( ) ,   B y R e f   p D e v i c e P a t h L e n   A s   I n t e g e r )   A s   I n t e g e r 
 
 
 
 Sxe
 
         n P o r t ; 
 
             c[S_ǌevU S B   p r i n t e r ,   1u1 Y. 
 
         p D e v i c e N a m e ; 
 
             2QX[U S B   p r i n t e r v݈n
T1z,   8eQBfpzzcj,   GR
NkXǌe. 
 
         p D e v i c e N a m e L e n ; 
 
             |TSQ_BfkXeQp D e v i c e N a m e fX[@Svw^;   8QBfGRgVP݈n
T1zvw^. 
 
         p D e v i c e P a t h ; 
 
             2QX[U S B   p r i n t e r v݈n_,   8eQBfpzzcj,   GR
NkXǌe. 
 
         p D e v i c e P a t h L e n ; 
 
             |TSQ_BfkXeQp D e v i c e P a t h fX[@Svw^;   8QBfGRgVP݈n_vw^. 
 
     
 
 PV<P
 
         0   - >   O K . 
 
         R e f e r e n c e   A W - E r r o r . t x t   f i l e . 
 
 
 
 {O
 
     V C : 
 
         c h a r   b u f 1 [ 1 2 8 ] = { 0 } ,   b u f 2 [ 1 2 8 ] = { 0 } ; 
 
         i n t   n L e n 1 = 1 2 8 ,   n L e n 2 = 1 2 8 ,   n l e n ; 
 
         n l e n   =   A _ G e t U S B B u f f e r L e n ( )   +   1 ; 
 
         i f   ( n l e n   >   1 )   { 
 
             A _ G e t U S B D e v i c e I n f o ( 1 ,   b u f 1 ,   & n L e n 1 ,   b u f 2 ,   & n L e n 2 ) ; 
 
             A _ C r e a t e P r n ( 1 2 ,   b u f 2 ) ;   / / o r   A _ C r e a t e P o r t ( 6 ,   0 ,   b u f 2 ) ; 
 
         } 
 
     V B :   V B A : 
 
         D i m   b u f 1   A s   S t r i n g 
 
         D i m   b u f 2   A s   S t r i n g 
 
         D i m   n L e n 1 ,   n L e n 2 ,   n l e n   A s   L o n g 
 
 
 
         n l e n   =   A _ G e t U S B B u f f e r L e n ( )   +   1 
 
         I f   n l e n   >   1   T h e n 
 
             n L e n 1   =   1 2 8 
 
             n L e n 2   =   1 2 8 
 
             b u f 1   =   S p a c e ( n L e n 1 ) 
 
             b u f 2   =   S p a c e ( n L e n 2 ) 
 
             C a l l   A _ G e t U S B D e v i c e I n f o ( 1 ,   b u f 1 ,   n L e n 1 ,   b u f 2 ,   n L e n 2 ) 
 
             C a l l   A _ C r e a t e P r n ( 1 2 ,   b u f 2 )   ' o r   C a l l   A _ C r e a t e P o r t ( 6 ,   0 ,   b u f 2 ) 
 
         E n d   I f 
 
     V B . n e t : 
 
         D i m   b u f 1 ( )   A s   B y t e 
 
         D i m   b u f 2 ( )   A s   B y t e 
 
         D i m   n L e n 1 ,   n L e n 2 ,   n l e n   A s   I n t e g e r 
 
         D i m   e n c A s c I I   =   S y s t e m . T e x t . E n c o d i n g . A S C I I 
 
 
 
         n l e n   =   A _ G e t U S B B u f f e r L e n ( )   +   1 
 
         I f   n l e n   >   1   T h e n 
 
             n L e n 1   =   1 2 8 
 
             n L e n 2   =   1 2 8 
 
             R e D i m   b u f 1 ( n L e n 1 ) 
 
             R e D i m   b u f 2 ( n L e n 2 ) 
 
             C a l l   A _ G e t U S B D e v i c e I n f o ( 1 ,   b u f 1 ,   n L e n 1 ,   b u f 2 ,   n L e n 2 ) 
 
             C a l l   A _ C r e a t e P r n ( 1 2 ,   e n c A s c I I . G e t S t r i n g ( b u f 2 ,   0 ,   n L e n 2 ) ) 
 
             ' o r   C a l l   A _ C r e a t e P o r t ( 6 ,   0 ,   e n c A s c I I . G e t S t r i n g ( b u f 2 ,   0 ,   n L e n 2 ) ) 
 
         E n d   I f 
 
 
 
 f    dkQ_HQ|TS  A _ G e t U S B B u f f e r L e n ( )   S_  U S B   p r i n t e r vǌew^,   6q_Q|TS  
 
         A _ G e t U S B D e v i c e I n f o ( )   S_  U S B   p r i n t e r vvܕǌe0
 
         p D e v i c e P a t h @b2QX[vǌe/fU S B v݈n_,   S(u(WA _ C r e a t e P r n ( ) SA _ C r e a t e P o r t ( ) 
 
         O_UU S B ݈n0
 
 
 
 * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * 
 
 A _ G e t N e t P r i n t e r B u f f e r L e n ( ) 
 
 A _ E n u m N e t P r i n t e r ( ) 
 
 = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = 
 
 R    S_  N e t   P r i n t e r   v݈n
T1zSǌew^0
 
 
 
 l
 
     V C : 
 
         i n t   A _ G e t N e t P r i n t e r B u f f e r L e n ( v o i d ) ; 
 
         i n t   A _ E n u m N e t P r i n t e r ( c h a r   * b u f ) ; 
 
     V B :   V B A : 
 
         D e c l a r e   F u n c t i o n   A _ G e t N e t P r i n t e r B u f f e r L e n ( )   A s   L o n g 
 
         D e c l a r e   F u n c t i o n   A _ E n u m N e t P r i n t e r ( B y V a l   b u f   A s   S t r i n g )   A s   L o n g 
 
     V B . n e t : 
 
         D e c l a r e   F u n c t i o n   A _ G e t N e t P r i n t e r B u f f e r L e n ( )   A s   I n t e g e r 
 
         D e c l a r e   F u n c t i o n   A _ E n u m N e t P r i n t e r ( B y V a l   b u f   A s   B y t e ( ) )   A s   I n t e g e r 
 
 
 
 Sxe
 
         b u f ; 
 
             2QX[  N e t   P r i n t e r   ǌe0
 
 
 
 PV<P
 
         A _ G e t N e t P r i n t e r B u f f e r L e n ( ) ;     PV  N e t   P r i n t e r   vǌew^. 
 
         A _ E n u m N e t P r i n t e r ( ) ;     0   - >   O K . 
 
         R e f e r e n c e   A W - E r r o r . t x t   f i l e . 
 
 
 
 {O
 
     V C : 
 
         c h a r   * p b u f ; 
 
         i n t   n L e n   =   A _ G e t N e t P r i n t e r B u f f e r L e n ( )   +   1 ; 
 
         i f   ( n L e n   >   1 )   { 
 
             p b u f   =   ( c h a r   * ) n e w   c h a r [ n L e n ] ; 
 
             A _ E n u m N e t P r i n t e r ( p b u f ) ; 
 
         } 
 
     V B :   V B A : 
 
         D i m   n L e n   A s   L o n g 
 
         D i m   p b u f   A s   S t r i n g 
 
         n L e n   =   A _ G e t N e t P r i n t e r B u f f e r L e n ( )   +   1 
 
         I f   n L e n   >   1   T h e n 
 
             p b u f   =   S p a c e ( 1 2 8 ) 
 
             C a l l   A _ E n u m N e t P r i n t e r ( p b u f ) 
 
         E n d   I f 
 
     V B . n e t : 
 
         D i m   n L e n   A s   I n t e g e r 
 
         D i m   p b u f ( 1 2 8 )   A s   B y t e 
 
         n L e n   =   A _ G e t N e t P r i n t e r B u f f e r L e n ( )   +   1 
 
         I f   n L e n   >   1   T h e n 
 
             C a l l   A _ E n u m N e t P r i n t e r ( p b u f ) 
 
         E n d   I f 
 
 
 
 f    iQPQxe/f ND}vQxe0HQ(u  A _ G e t N e t P r i n t e r B u f f e r L e n ( )   S_  N e t   P r i n t e r 
 
         vǌew^,   6q_QMaԚf}  A _ E n u m N e t P r i n t e r ( )   2QX[  N e t   P r i n t e r   vǌe0
 
         N e t   P r i n t e r   vǌe/fN( " 0 x 0 d 0 x 0 a " ) ZPR, 	OO,   Ygǌe/f  
 
         N e t P r i n t e r : 1 9 2 . 1 6 8 . 1 . 2 ( 0 x 0 d ) ( 0 x 0 a ) N e t P r i n t e r : 1 9 2 . 1 6 8 . 1 . 2 5   vqh:y  
 
         N e t P r i n t e r 1   /fc  N e t P r i n t e r : 1 9 2 . 1 6 8 . 1 . 2 ,   
 
         N e t P r i n t e r 2   /fc  N e t P r i n t e r : 1 9 2 . 1 6 8 . 1 . 2 5 0
 
 
 
 * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * 
 
 A _ C r e a t e P r n ( ) 
 
 = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = 
 
 R    _U  P P L A   L i b r a r y   ]\O0
 
 
 
 l
 
     V C : 
 
         i n t   A _ C r e a t e P r n ( i n t   s e l e c t i o n ,   L P C T S T R   f i l e n a m e ) ; 
 
     V B :   V B A : 
 
         D e c l a r e   F u n c t i o n   A _ C r e a t e P r n ( B y V a l   s e l e c t i o n   A s   L o n g ,   _ 
 
             B y V a l   f i l e n a m e   A s   S t r i n g )   A s   L o n g 
 
     V B . n e t : 
 
         D e c l a r e   F u n c t i o n   A _ C r e a t e P r n ( B y V a l   s e l e c t i o n   A s   I n t e g e r ,   _ 
 
             B y V a l   f i l e n a m e   A s   S t r i n g )   A s   I n t e g e r 
 
 
 
 Sxe
 
         s e l e c t i o n ; 
 
             xd8QWbjHh0
 
             0   - >   p r i n t   t o   f i l e . 
 
             1   - >   l p t 1 ,   2   - >   l p t 2 ,   3   - >   l p t 3 
 
             4   - >   c o m 1 ,   5   - >   c o m 2 ,   6   - >   c o m 3 
 
             1 0   - >   p i p e ,   1 1   - >   U S B X X X ,   1 2   - >   U S B 
 
             1 3   - >   L A N   C l i e n t ( T C P / I P ) 
 
         f i l e n a m e ; 
 
             vu  s e l e c t i o n   /f  0   BfǌeGR8QjHhf i l e n a m e   pjHh
T1zS+T_0
 
             vu  s e l e c t i o n   /f  1 0   Bff i l e n a m e   p8Q_b_jx( ݈n_) 0
 
             vu  s e l e c t i o n   /f  1 1   Bff i l e n a m e   cv/f`_UvU S B KNi n d e x ,   i n d e x 1u1 Y; 
 
             vu  s e l e c t i o n   /f  1 2   Bff i l e n a m e   cv/f`_UvU S B _jx( ݈n_) ,   Tn P o r t   =   1 0 vO(uel N#j
 
             vu  s e l e c t i o n   /f  1 3   Bf,   f i l e n a m e   cv/f`_UvI P   A d d r e s s ,   O(uT C P / I P S_U;   
 
                 -vp o r t <Pp9 1 0 0 ,   傁c[p o r t <P,   Y8 0 ,   GR(WI P A d d r e s s _R
NW[2N" : 8 0 " . 
 
 
 
 PV<P
 
         0   - >   O K . 
 
         R e f e r e n c e   A W - E r r o r . t x t   f i l e . 
 
 
 
 {O
 
     V C : 
 
         i n t   n L e n ; 
 
         A _ C r e a t e P r n ( 1 , N U L L ) ;   b  A _ C r e a t e P r n ( 0 , " C : \ \ o u t . p r n " ) ; 
 
         A _ C r e a t e P r n ( 1 0 , " \ \ \ \ a l l e n \ \ L a b e l " ) ;     / / qQN!j_. 
 
     V B :   V B A :   V B . n e t : 
 
         D i m   n L e n   A s   L o n g 
 
         C a l l   A _ C r e a t e P r n ( 1 ,   n u l l )   o r   C a l l   A _ C r e a t e P r n ( 0 , " C : \ \ o u t . p r n " ) 
 
         C a l l   A _ C r e a t e P r n ( 1 0 ,   " \ \ \ \ a l l e n \ \ L a b e l " ) 
 
 
 
 f    A _ C r e a t e P r n ( ) Qxeg_U`Oxdv8QWb_U`OueQv8Qj0
 
         PQxe_(W@b	gQxeKNMRWL0
 
         A _ C r e a t e P r n ( ) ,   A _ C r e a t e U S B P o r t ( ) ,   A _ C r e a t e N e t P o r t ( )   T  A _ C r e a t e P o r t ( ) 
NTBfO(u0
 
 
 
 * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * 
 
 A _ C r e a t e P o r t ( ) 
 
 = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = 
 
 R    _U  P P L A   L i b r a r y   ]\O0
 
 
 
 l
 
     V C : 
 
         i n t   A _ C r e a t e P o r t ( i n t   n P o r t T y p e ,   i n t   n P o r t ,   L P C T S T R   f i l e n a m e ) ; 
 
     V B :   V B A : 
 
         D e c l a r e   F u n c t i o n   A _ C r e a t e P o r t ( B y V a l   n P o r t T y p e   A s   L o n g ,   B y V a l   n P o r t   A s   L o n g ,   _ 
 
             B y V a l   f i l e n a m e   A s   S t r i n g )   A s   L o n g 
 
     V B . n e t : 
 
         D e c l a r e   F u n c t i o n   A _ C r e a t e P o r t ( B y V a l   n P o r t T y p e   A s   I n t e g e r ,   B y V a l   n P o r t   A s   I n t e g e r ,   _ 
 
             B y V a l   f i l e n a m e   A s   S t r i n g )   A s   I n t e g e r 
 
 
 
 Sxe
 
         n P o r t T y p e ; 
 
             xd8QW.z^0
 
             0   - >   jHh
 
             1   - >   S e r i a l   p o r t 
 
             2   - >   P a r a l l e l   p r o t 
 
             4   - >   U S B   p o r t 
 
             5   - >   L A N   p o r t 
 
             6   - >   U S B   p o r t 
 
         n P o r t ; 
 
             xd8QW}_0
 
             vu  n P o r t T y p e   p  1   Bf,   1   - >   c o m 1 ,   2   - >   c o m 2 . . . . . 
 
         f i l e n a m e ; 
 
             vu  n P o r t T y p e   p  0   BfǌeGR8QjHhf i l e n a m e   pjHh
T1zS+T_0
 
             vu  n P o r t T y p e   p  4   Bff i l e n a m e   cv/f`_UvU S B vi n d e x ,   1ui n d e x 1u1 Y. 
 
             vu  n P o r t T y p e   p  5   Bff i l e n a m e   cv/f`_UvI P   A d d r e s s ,   O(uT C P / I P ,   p o r t   9 1 0 0 S_U. 
 
             vu  n P o r t T y p e   p  6   Bff i l e n a m e   cv/f`_UvU S B v݈n_. 
 
 
 
 PV<P
 
         0   - >   O K . 
 
         R e f e r e n c e   A W - E r r o r . t x t   f i l e . 
 
 
 
 {O
 
     V C : 
 
         A _ C r e a t e P o r t ( 1 ,   1 ,   N U L L ) ; 
 
         A _ C r e a t e P o r t ( 0 ,   0 ,   " C : \ \ o u t . p r n " ) ; 
 
         A _ C r e a t e P o r t ( 5 ,   0 ,   " 1 9 2 . 1 6 8 . 1 . 3 " ) ; 
 
     V B :   V B A :   V B . n e t : 
 
         C a l l   A _ C r e a t e P o r t ( 1 ,   1 ,   n u l l ) 
 
         C a l l   A _ C r e a t e P o r t ( 0 ,   0 ,   " C : \ \ o u t . p r n " ) 
 
         C a l l   A _ C r e a t e P o r t ( 5 ,   0 ,   " 1 9 2 . 1 6 8 . 1 . 3 " ) 
 
 
 
 f    A _ C r e a t e P o r t ( )   Qxeg_U`Oxdv8QWb_U`OueQv8Qj0
 
         PQxe_(W@b	gQxeKNMRWL0
 
         A _ C r e a t e P r n ( ) ,   A _ C r e a t e U S B P o r t ( ) ,   A _ C r e a t e N e t P o r t ( )   T  A _ C r e a t e P o r t ( ) 
NTBfO(u0
 
 
 
 * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * 
 
 A _ C r e a t e U S B P o r t ( ) 
 
 A _ C r e a t e N e t P o r t ( ) 
 
 = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = 
 
 R  _U  P P L A   L i b r a r y   ]\O0
 
               O(u  A _ C r e a t e U S B P o r t ( )   MR HQ|TS  A _ G e t U S B B u f f e r L e n ( ) ,   
 
               /fpNT  A _ E n u m U S B ( )   S  A _ G e t U S B D e v i c e I n f o ( )   Tek0
 
               O(u  A _ C r e a t e N e t P o r t ( )   MR HQ|TS  A _ G e t N e t P r i n t e r B u f f e r L e n ( ) ,   
 
               /fpNT  A _ E n u m N e t P r i n t e r ( )   Tek0
 
 
 
 l
 
     V C : 
 
         i n t   A _ C r e a t e U S B P o r t ( i n t   n P o r t ) ; 
 
         i n t   A _ C r e a t e N e t P o r t ( i n t   n P o r t ) ; 
 
     V B :   V B A : 
 
         D e c l a r e   F u n c t i o n   A _ C r e a t e U S B P o r t ( B y V a l   n P o r t   A s   L o n g )   A s   L o n g 
 
         D e c l a r e   F u n c t i o n   A _ C r e a t e N e t P o r t ( B y V a l   n P o r t   A s   L o n g )   A s   L o n g 
 
     V B . n e t : 
 
         D e c l a r e   F u n c t i o n   A _ C r e a t e U S B P o r t ( B y V a l   n P o r t   A s   I n t e g e r )   A s   I n t e g e r 
 
         D e c l a r e   F u n c t i o n   A _ C r e a t e N e t P o r t ( B y V a l   n P o r t   A s   I n t e g e r )   A s   I n t e g e r 
 
 
 
 Sxe                  
 
         n P o r t ; 
 
             U S B   T  L A N   vP8W,   n P o r t 1u1 Y. 
 
 
 
 PV<P
 
         0   - >   O K . 
 
         R e f e r e n c e   A W - E r r o r . t x t   f i l e . 
 
 
 
 {O
 
     V C : 
 
         i n t   n L e n ; 
 
         n L e n   =   A _ G e t U S B B u f f e r L e n ( ) ; 
 
         i f   ( n L e n )   { 
 
             A _ C r e a t e U S B P o r t ( 1 ) ; 
 
         } 
 
         n L e n   =   A _ G e t N e t P r i n t e r B u f f e r L e n ( ) ; 
 
         i f   ( n L e n )   { 
 
             A _ C r e a t e N e t P o r t ( 1 ) ; 
 
         } 
 
     V B :   V B A :   V B . n e t : 
 
         D i m   n L e n   A s   L o n g 
 
         n L e n   =   A _ G e t U S B B u f f e r L e n ( ) 
 
         I f   n L e n   T h e n 
 
             C a l l   A _ C r e a t e U S B P o r t ( 1 ) 
 
         E n d   I f 
 
         n L e n   =   A _ G e t N e t P r i n t e r B u f f e r L e n ( ) 
 
         I f   n L e n   T h e n 
 
             C a l l   A _ C r e a t e N e t P o r t ( 1 ) 
 
         E n d   I f 
 
 
 
 f    A _ C r e a t e U S B P o r t ( )   T  A _ C r e a t e N e t P o r t ( ) Qxeg_U`Oxdv8QWb
 
         _U`OueQv8Qj0PQxe_(W@b	gQxeKNMRWL0
 
         A _ C r e a t e P r n ( ) ,   A _ C r e a t e U S B P o r t ( ) ,   A _ C r e a t e N e t P o r t ( )   T  A _ C r e a t e P o r t ( ) 
NTBfO(u0
 
 
 
 * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * 
 
 A _ C l o s e P r n ( ) 
 
 = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = 
 
 R    ܕ  A _ P r i n t e r   ]\O0
 
 
 
 l
 
     V C : 
 
         v o i d   A _ C l o s e P r n ( v o i d ) ; 
 
     V B :   V B A :   V B . n e t : 
 
         D e c l a r e   S u b   A _ C l o s e P r n ( ) 
 
 
 
 {O
 
     V C : 
 
         A _ C l o s e P r n ( ) ; 
 
     V B :   V B A :   V B . n e t : 
 
         C a l l   A _ C l o s e P r n ( ) 
 
 
 
 f    P  A _ C l o s e P r n   Qxegܕ`Oxdv8QWbܕ`O_Uv8Qj0PQ
 
         xe_(W@b	gQxeKN_WL0
 
 
 
 * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * 
 
 A _ B a r 2 d _ M a x i ( ) 
 
 A _ B a r 2 d _ M a x i _ O r i ( ) 
 
 = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = 
 
 R    pSQ NP  M a x i   C o d e   2 D   B a r c o d e 0
 
 
 
 l
 
     V C : 
 
         i n t   A _ B a r 2 d _ M a x i ( i n t   x ,   i n t   y ,   i n t   p r i m a r y ,   i n t   s e c o n d a r y , 
 
             i n t   c o u n t r y ,   i n t   s e r v i c e ,   c h a r   m o d e ,   i n t   n u m e r i c ,   L P C T S T R   d a t a ) ; 
 
         i n t   A _ B a r 2 d _ M a x i _ O r i ( i n t   x ,   i n t   y ,   i n t   o r i ,   i n t   p r i m a r y ,   i n t   s e c o n d a r y ,   
 
             i n t   c o u n t r y ,   i n t   s e r v i c e ,   c h a r   m o d e ,   i n t   n u m e r i c ,   L P C T S T R   d a t a ) ; 
 
     V B :   V B A : 
 
         D e c l a r e   F u n c t i o n   A _ B a r 2 d _ M a x i ( B y V a l   x   A s   L o n g ,   B y V a l   y   A s   L o n g ,   _ 
 
             B y V a l   p r i m a r y   A s   L o n g ,   B y V a l   s e c o n d a r y   A s   L o n g ,   B y V a l   c o u n t r y   A s   L o n g ,   _ 
 
             B y V a l   s e r v i c e   A s   L o n g ,   B y V a l   m o d e   A s   B y t e ,   B y V a l   n u m e r i c   A s   L o n g ,   _ 
 
             B y V a l   d a t a   A s   S t r i n g )   A s   L o n g 
 
         D e c l a r e   F u n c t i o n   A _ B a r 2 d _ M a x i _ O r i ( B y V a l   x   A s   L o n g ,   B y V a l   y   A s   L o n g ,   _ 
 
             B y V a l   o r i   A s   L o n g ,   B y V a l   p r i m a r y   A s   L o n g ,   B y V a l   s e c o n d a r y   A s   L o n g ,   _ 
 
             B y V a l   c o u n t r y   A s   L o n g ,   B y V a l   s e r v i c e   A s   L o n g ,   B y V a l   m o d e   A s   B y t e ,   _ 
 
             B y V a l   n u m e r i c   A s   L o n g ,   B y V a l   d a t a   A s   S t r i n g )   A s   L o n g 
 
     V B . n e t : 
 
         D e c l a r e   F u n c t i o n   A _ B a r 2 d _ M a x i ( B y V a l   x   A s   I n t e g e r ,   B y V a l   y   A s   I n t e g e r ,   _ 
 
             B y V a l   p r i m a r y   A s   I n t e g e r ,   B y V a l   s e c o n d a r y   A s   I n t e g e r ,   B y V a l   c o u n t r y   A s   I n t e g e r ,   _ 
 
             B y V a l   s e r v i c e   A s   I n t e g e r ,   B y V a l   m o d e   A s   B y t e ,   B y V a l   n u m e r i c   A s   I n t e g e r ,   _ 
 
             B y V a l   d a t a   A s   S t r i n g )   A s   I n t e g e r 
 
         D e c l a r e   F u n c t i o n   A _ B a r 2 d _ M a x i _ O r i ( B y V a l   x   A s   I n t e g e r ,   B y V a l   y   A s   I n t e g e r ,   _ 
 
             B y V a l   o r i   A s   I n t e g e r ,   B y V a l   p r i m a r y   A s   I n t e g e r ,   B y V a l   s e c o n d a r y   A s   I n t e g e r ,   _ 
 
             B y V a l   c o u n t r y   A s   I n t e g e r ,   B y V a l   s e r v i c e   A s   I n t e g e r ,   B y V a l   m o d e   A s   B y t e ,   _ 
 
             B y V a l   n u m e r i c   A s   I n t e g e r ,   B y V a l   d a t a   A s   S t r i n g )   A s   I n t e g e r 
 
 
 
 Sxe
 
         x ; 
 
             X   ^j0( 1 0 0   =   1   T) 
 
         y ; 
 
             Y   ^j0( 1 0 0   =   1   T) 
 
         o r i ; 
 
             RpSeT[MO1 : 0  02 : 9 0  03 : 1 8 0  04 : 2 7 0  
 
         p r i m a r y ; 
 
             A   5 - MOxe  p r i m a r y   z i p   c o d e . 
 
         s e c o n d a r y ; 
 
             A   4 - MOxe  s e c o n d a r y   z i p   c o d e . 
 
         c o u n t r y ; 
 
             A   3 - MOxe  c o u n t r y   c o d e . 
 
         s e r v i c e ; 
 
             A   3 - MOxe  s e r v i c e   c o d e . 
 
         m o d e ; 
 
             DRRYNh
 
             + - - - - + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + 
 
             | m o d e |                       Rf                                    | 
 
             + - - - - + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + 
 
             |   A     | 
\xeW[RXR_.                                     | 
 
             + - - - - + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + 
 
             |   B     | 
\W[kRXR_.                                     | 
 
             + - - - - + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + 
 
             |   C     | 
\xeW[Rn\_.                                     | 
 
             + - - - - + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + 
 
             |   D     | 
\W[kRn\_.                                     | 
 
             + - - - - + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + 
 
             |   T     | 9eB}P}W[CQ.                                                 | 
 
             + - - - - + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + 
 
             |   N     | !qNUOR.                                                 | 
 
             + - - - - + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + 
 
         n u m e r i c ; 
 
             RXRbn\_ϑ0{
W0 ~ 9 9 
 
             vu	gDRRBfdkkMO_X[(W0
 
         d a t a ; 
 
             ǌeW[2N gY8 4 PW[CQ0
 
 
 
 PV<P
 
         0   - >   O K . 
 
         R e f e r e n c e   A W - E r r o r . t x t   f i l e . 
 
 
 
 {O
 
     V C : 
 
         A _ B a r 2 d _ M a x i ( 1 0 0 ,   2 0 0 ,   3 2 9 8 7 ,   4 4 4 ,   4 0 ,   5 5 ,   ' N ' ,   2 ,   " T O   1 2 3 " ) ; 
 
         A _ B a r 2 d _ M a x i _ O r i ( 1 0 0 ,   2 0 0 ,   0 ,   3 2 9 8 7 ,   4 4 4 ,   4 0 ,   5 5 ,   ' N ' ,   2 ,   " T O   1 2 3 " ) ; 
 
     V B :   V B A :   V B . n e t : 
 
         C a l l   A _ B a r 2 d _ M a x i ( 1 0 0 ,   2 0 0 ,   3 2 9 8 7 ,   4 4 4 ,   4 0 ,   5 5 ,   A s c ( " N " ) ,   2 ,   " T O   1 2 3 " ) 
 
         C a l l   A _ B a r 2 d _ M a x i _ O r i ( 1 0 0 ,   2 0 0 ,   0 ,   3 2 9 8 7 ,   4 4 4 ,   4 0 ,   5 5 ,   A s c ( " N " ) ,   2 ,   " T O   1 2 3 " ) 
 
 
 
 f    P  A _ B a r 2 d _ M a x i   QxeSNRpSQ NP  M a x i   C o d e   2 D   B a r c o d e 0
 
 
 
 * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * 
 
 A _ B a r 2 d _ P D F 4 1 7 ( ) 
 
 A _ B a r 2 d _ P D F 4 1 7 _ O r i ( ) 
 
 = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = 
 
 R    pSQ NP  P D F - 4 1 7   2 D   B a r c o d e 0
 
 
 
 l
 
     V C : 
 
         i n t   A _ B a r 2 d _ P D F 4 1 7 ( i n t   x ,   i n t   y ,   i n t   n a r r o w ,   i n t   w i d t h ,   c h a r   n o r m a l , 
 
             i n t   s e c u r i t y ,   i n t   a s p e c t ,   i n t   r o w ,   i n t   c o l u m n ,   c h a r   m o d e ,   i n t   n u m e r i c , 
 
             L P C T S T R   d a t a ) ; 
 
         i n t   A _ B a r 2 d _ P D F 4 1 7 _ O r i ( i n t   x ,   i n t   y ,   i n t   o r i ,   i n t   n a r r o w ,   i n t   w i d t h ,   c h a r   n o r m a l , 
 
             i n t   s e c u r i t y ,   i n t   a s p e c t ,   i n t   r o w ,   i n t   c o l u m n ,   c h a r   m o d e ,   i n t   n u m e r i c , 
 
             L P C T S T R   d a t a ) ; 
 
     V B :   V B A : 
 
         D e c l a r e   F u n c t i o n   A _ B a r 2 d _ P D F 4 1 7 ( B y V a l   x   A s   L o n g ,   B y V a l   y   A s   L o n g ,   _ 
 
             B y V a l   n a r r o w   A s   L o n g ,   B y V a l   w i d t h   A s   L o n g ,   B y V a l   n o r m a l   A s   B y t e ,   _ 
 
             B y V a l   s e c u r i t y   A s   L o n g ,   B y V a l   a s p e c t   A s   L o n g ,   B y V a l   r o w   A s   L o n g ,   _ 
 
             B y V a l   c o l u m n   A s   L o n g ,   B y V a l   m o d e   A s   B y t e ,   B y V a l   n u m e r i c   A s   L o n g ,   _ 
 
             B y V a l   d a t a   A s   S t r i n g )   A s   L o n g 
 
         D e c l a r e   F u n c t i o n   A _ B a r 2 d _ P D F 4 1 7 _ O r i ( B y V a l   x   A s   L o n g ,   B y V a l   y   A s   L o n g ,   _ 
 
             B y V a l   o r i   A s   L o n g ,   B y V a l   n a r r o w   A s   L o n g ,   B y V a l   w i d t h   A s   L o n g ,   _ 
 
             B y V a l   n o r m a l   A s   B y t e ,   B y V a l   s e c u r i t y   A s   L o n g ,   B y V a l   a s p e c t   A s   L o n g ,   _ 
 
             B y V a l   r o w   A s   L o n g ,   B y V a l   c o l u m n   A s   L o n g ,   B y V a l   m o d e   A s   B y t e ,   _ 
 
             B y V a l   n u m e r i c   A s   L o n g ,   B y V a l   d a t a   A s   S t r i n g )   A s   L o n g 
 
     V B . n e t : 
 
         D e c l a r e   F u n c t i o n   A _ B a r 2 d _ P D F 4 1 7 ( B y V a l   x   A s   I n t e g e r ,   B y V a l   y   A s   I n t e g e r ,   _ 
 
             B y V a l   n a r r o w   A s   I n t e g e r ,   B y V a l   w i d t h   A s   I n t e g e r ,   B y V a l   n o r m a l   A s   B y t e ,   _ 
 
             B y V a l   s e c u r i t y   A s   I n t e g e r ,   B y V a l   a s p e c t   A s   I n t e g e r ,   B y V a l   r o w   A s   I n t e g e r ,   _ 
 
             B y V a l   c o l u m n   A s   I n t e g e r ,   B y V a l   m o d e   A s   B y t e ,   B y V a l   n u m e r i c   A s   I n t e g e r ,   _ 
 
             B y V a l   d a t a   A s   S t r i n g )   A s   I n t e g e r 
 
         D e c l a r e   F u n c t i o n   A _ B a r 2 d _ P D F 4 1 7 _ O r i ( B y V a l   x   A s   I n t e g e r ,   B y V a l   y   A s   I n t e g e r ,   _ 
 
             B y V a l   o r i   A s   I n t e g e r ,   B y V a l   n a r r o w   A s   I n t e g e r ,   B y V a l   w i d t h   A s   I n t e g e r ,   _ 
 
             B y V a l   n o r m a l   A s   B y t e ,   B y V a l   s e c u r i t y   A s   I n t e g e r ,   B y V a l   a s p e c t   A s   I n t e g e r ,   _ 
 
             B y V a l   r o w   A s   I n t e g e r ,   B y V a l   c o l u m n   A s   I n t e g e r ,   B y V a l   m o d e   A s   B y t e ,   _ 
 
             B y V a l   n u m e r i c   A s   I n t e g e r ,   B y V a l   d a t a   A s   S t r i n g )   A s   I n t e g e r 
 
 
 
 Sxe
 
         x ; 
 
             X   ^j0( 1 0 0   =   1   T) 
 
         y ; 
 
             Y   ^j0( 1 0 0   =   1   T) 
 
         o r i ; 
 
             RpSeT[MO1 : 0  02 : 9 0  03 : 1 8 0  04 : 2 7 0  
 
         n a r r o w ; 
 
             N A R R O W   b a r   [^{
W  0 ^2 4 0
 
         w i d t h ; 
 
             W I D E   b a r   [^{
W  0 ^2 4 0
 
         n o r m a l ; 
 
             F : n o r m a l ,   T : t r u n c a t e d . 
 
         s e c u r i t y ; 
 
             0 ^8 : s e c u r i t y   l e v e l . 
 
         a s p e c t ; 
 
             0 ^9 9 : a s p e c t   r a t i o , 0   s t a n d s   f o r   1 : 2 . 
 
         r o w ; 
 
             3 ^9 0 : r o w   n u m b e r , 0   f o r   b e s t   f i t . 
 
         c o l u m n ; 
 
             1 ^3 0 : c o l u m n   n u m b e r , 0   f o r   b e s t   f i t . 
 
         m o d e ; 
 
             DRRYNh
 
             + - - - - + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + 
 
             | m o d e |                       Rf                                    | 
 
             + - - - - + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + 
 
             |   A     | 
\xeW[RXR_.                                     | 
 
             + - - - - + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + 
 
             |   B     | 
\W[kRXR_.                                     | 
 
             + - - - - + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + 
 
             |   C     | 
\xeW[Rn\_.                                     | 
 
             + - - - - + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + 
 
             |   D     | 
\W[kRn\_.                                     | 
 
             + - - - - + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + 
 
             |   T     | 9eB}P}W[CQ.                                                 | 
 
             + - - - - + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + 
 
             |   N     | !qNUOR.                                                 | 
 
             + - - - - + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +                     
 
         n u m e r i c ; 
 
             RXRbn\_ϑ0{
W0 ^9 9 
 
             vu	gDRRBfdkkMO_X[(W0
 
             vu  m o d e   p  T   BfdkepB}P}W[CQ<P( AS2MO) 0
 
         d a t a ; 
 
             ǌeW[2N0
 
 
 
 PV<P
 
         0   - >   O K . 
 
         R e f e r e n c e   A W - E r r o r . t x t   f i l e . 
 
 
 
 {O
 
     V C : 
 
         A _ B a r 2 d _ P D F 4 1 7 ( 2 6 0 ,   0 ,   0 ,   0 ,   ' F ' ,   0 ,   0 ,   1 0 ,   2 ,   ' B ' ,   1 ,   " A R G O X I N F O " ) ; 
 
         A _ B a r 2 d _ P D F 4 1 7 _ O r i ( 2 6 0 ,   0 ,   0 ,   0 ,   ' F ' ,   0 ,   0 ,   1 0 ,   2 ,   ' T ' ,   0 , 
 
             " A R G O X I N F O \ r \ n D a t a   1 2 3 4 5 \ r \ n D a t a   5 5 5 " ) ; 
 
     V B :   V B A :   V B . n e t : 
 
         C a l l   A _ B a r 2 d _ P D F 4 1 7 ( 2 6 0 ,   0 ,   0 ,   0 ,   A s c ( " F " ) ,   0 ,   0 ,   1 0 ,   2 ,   A s c ( " B " ) ,   1 ,   " A R G O X I N F O " ) 
 
         C a l l   A _ B a r 2 d _ P D F 4 1 7 _ O r i ( 2 6 0 ,   0 ,   0 ,   0 ,   A s c ( " F " ) ,   0 ,   0 ,   1 0 ,   2 ,   A s c ( " T " ) ,   0 ,   _ 
 
             " A R G O X I N F O \ r \ n D a t a   1 2 3 4 5 \ r \ n D a t a   5 5 5 " ) 
 
 
 
 f    P  A _ B a r 2 d _ P D F 4 1 7   QxeSNRpSQ NP  P D F - 4 1 7   2 D   B a r c o d e 0
 
 
 
 * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * 
 
 A _ B a r 2 d _ D a t a M a t r i x ( ) 
 
 = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = 
 
 R    pSQ NP  D a t a M a t r i x   C o d e   2 D   B a r c o d e 0
 
 
 
 l
 
     V C : 
 
         i n t   A _ B a r 2 d _ D a t a M a t r i x ( i n t   x ,   i n t   y ,   i n t   r o t a t i o n ,   i n t   h o r _ m u l ,   i n t   v e r _ m u l , 
 
             i n t   E C C ,   i n t   d a t a _ f o r m a t ,   i n t   n u m _ r o w s ,   i n t   n u m _ c o l ,   c h a r   m o d e ,   i n t   n u m e r i c , 
 
             L P C T S T R   d a t a ) ; 
 
     V B :   V B A : 
 
         D e c l a r e   F u n c t i o n   A _ B a r 2 d _ D a t a M a t r i x ( B y V a l   x   A s   L o n g ,   B y V a l   y   A s   L o n g ,   _ 
 
             B y V a l   r o t a t i o n   A s   L o n g ,   B y V a l   h o r _ m u l   A s   L o n g ,   B y V a l   v e r _ m u l   A s   L o n g ,   _ 
 
             B y V a l   E C C   A s   L o n g ,   B y V a l   d a t a _ f o r m a t   A s   L o n g ,   B y V a l   n u m _ r o w s   A s   L o n g ,   _ 
 
             B y V a l   n u m _ c o l   A s   L o n g ,   B y V a l   m o d e   A s   B y t e ,   B y V a l   n u m e r i c   A s   L o n g ,   _ 
 
             B y V a l   d a t a   A s   S t r i n g )   A s   L o n g 
 
     V B . n e t : 
 
         D e c l a r e   F u n c t i o n   A _ B a r 2 d _ D a t a M a t r i x ( B y V a l   x   A s   I n t e g e r ,   B y V a l   y   A s   I n t e g e r ,   _ 
 
             B y V a l   r o t a t i o n   A s   I n t e g e r ,   B y V a l   h o r _ m u l   A s   I n t e g e r ,   B y V a l   v e r _ m u l   A s   I n t e g e r ,   _ 
 
             B y V a l   E C C   A s   I n t e g e r ,   B y V a l   d a t a _ f o r m a t   A s   I n t e g e r ,   B y V a l   n u m _ r o w s   A s   I n t e g e r ,   _ 
 
             B y V a l   n u m _ c o l   A s   I n t e g e r ,   B y V a l   m o d e   A s   B y t e ,   B y V a l   n u m e r i c   A s   I n t e g e r ,   _ 
 
             B y V a l   d a t a   A s   S t r i n g )   A s   I n t e g e r 
 
 
 
 Sxe
 
         x ; 
 
             X   ^j0( 1 0 0   =   1   T) 
 
         y ; 
 
             Y   ^j0( 1 0 0   =   1   T) 
 
         r o t a t i o n ; 
 
             RpSeT[MO1 : 0  02 : 9 0  03 : 1 8 0  04 : 2 7 0  
 
         h o r _ m u l ; 
 
             4ls^>e'Y
Pxe0<P: 1   ~   2 4 
 
         v e r _ m u l ; 
 
             Wv>e'Y
Pxe0<P: 1   ~   2 4 
 
         E C C ; 
 
             uP/I{}0V[<P: 2 0 0 
 
         d a t a _ f o r m a t ; 
 
             ǌeR^0V[<P: 0 
 
         n u m _ r o w s ; 
 
             r o w   n u m b e r ,   <P: 1 0 , 1 2 , 1 4 , 1 6 , 1 8 , 2 0 , 2 2 , 2 4 , 2 6 , 3 2 , 
 
             3 6 , 4 0 , 4 4 , , 4 8 , 5 2 , 6 4 , 7 2 , 8 0 , 8 8 , 9 6 , 1 0 4 , 1 2 0 , 1 3 2 , 1 4 4 
 
         n u m _ c o l ; 
 
             c o l u m n   n u m b e r ,   <P: 1 0 , 1 2 , 1 4 , 1 6 , 1 8 , 2 0 , 2 2 , 2 4 , 2 6 , 3 2 , 
 
             3 6 , 4 0 , 4 4 , , 4 8 , 5 2 , 6 4 , 7 2 , 8 0 , 8 8 , 9 6 , 1 0 4 , 1 2 0 , 1 3 2 , 1 4 4 
 
         m o d e ; 
 
             DRRYNh
 
             + - - - - + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + 
 
             | m o d e |                       Rf                                    | 
 
             + - - - - + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + 
 
             |   A     | 
\xeW[RXR_.                                     | 
 
             + - - - - + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + 
 
             |   B     | 
\W[kRXR_.                                     | 
 
             + - - - - + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + 
 
             |   C     | 
\xeW[Rn\_.                                     | 
 
             + - - - - + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + 
 
             |   D     | 
\W[kRn\_.                                     | 
 
             + - - - - + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + 
 
             |   T     | 9eB}P}W[CQ.                                                 | 
 
             + - - - - + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + 
 
             |   N     | !qNUOR.                                                 | 
 
             + - - - - + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +                         
 
         n u m e r i c ; 
 
             RXRbn\_ϑ0{
W0 ~ 9 9 
 
             vu	gDRRBfdkkMO_X[(W0
 
         d a t a ; 
 
             ǌeW[2N0
 
 
 
 PV<P
 
         0   - >   O K . 
 
         R e f e r e n c e   A W - E r r o r . t x t   f i l e . 
 
 
 
 {O
 
     V C : 
 
         A _ B a r 2 d _ D a t a M a t r i x ( 1 0 0 ,   1 0 0 ,   1 ,   8 ,   8 ,   2 0 0 ,   0 ,   2 4 ,   2 4 ,   ' N ' ,   2 ,   " D A T A M A T R I X " ) ; 
 
     V B :   V B A :   V B . n e t : 
 
         C a l l   A _ B a r 2 d _ D a t a M a t r i x ( 1 0 0 ,   1 0 0 ,   1 ,   8 ,   8 ,   2 0 0 ,   0 ,   2 4 ,   2 4 ,   A s c ( " N " ) ,   2 ,   " D A T A M A T R I X " ) 
 
 
 
 f    P  A _ B a r 2 d _ D a t a M a t r i x   QxeSNRpSQ NP  D a t a M a t r i x   2 D   B a r c o d e 0
 
 
 
 * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * 
 
 A _ C l e a r _ M e m o r y ( ) 
 
 = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = 
 
 R    nd  P r i n t e r   gQ  F l a s h   M e m o r y   vǌe0
 
 
 
 l
 
     V C : 
 
         v o i d   A _ C l e a r _ M e m o r y ( v o i d ) ; 
 
     V B :   V B A :   V B . n e t : 
 
         D e c l a r e   S u b   A _ C l e a r _ M e m o r y ( ) 
 
 
 
 {O
 
     V C : 
 
         A _ C l e a r _ M e m o r y ( ) ; 
 
     V B :   V B A :   V B . n e t : 
 
         C a l l   A _ C l e a r _ M e m o r y ( ) 
 
 
 
 f    P  A _ C l e a r _ M e m o r y   Qxend  P r i n t e r   gQ  F l a s h   M e m o r y   vWb_0ߎ
 
         ԚW[b_0VpWb_0W[b_g Nv/}Mz(W  m e m o r y    b  o v e r f l o w ck8^BfQxe(W
 
         P r i n t _ O u t ( )   KNMRQ0vu  m e m o r y   EQncNP r i n t e r   1\g*RdHQMR	eQv
 
         Wb_TW[b_pMQ|vu
Nvuv*RdHQ(W  A _ P r i n t _ O u t ( )   KNMRQ0
 
 
 
 * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * 
 
 A _ D e l _ G r a p h i c ( ) 
 
 = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = 
 
 R    *Rd2QX[(WpSh_j  R A M   b  F l a s h   M e m o r y   gQvWb_0
 
 
 
 l
 
     V C : 
 
         i n t   A _ D e l _ G r a p h i c ( i n t   m e m _ m o d e ,   c h a r   g r a p h i c [ 1 0 ] ) ; 
 
     V B :   V B A : 
 
         D e c l a r e   F u n c t i o n   A _ D e l _ G r a p h i c ( B y V a l   m e m _ m o d e   A s   L o n g ,   _ 
 
             B y V a l   g r a p h i c   A s   S t r i n g )   A s   L o n g 
 
     V B . n e t : 
 
         D e c l a r e   F u n c t i o n   A _ D e l _ G r a p h i c ( B y V a l   m e m _ m o d e   A s   I n t e g e r ,   _ 
 
             B y V a l   g r a p h i c   A s   S t r i n g )   A s   I n t e g e r 
 
 
 
 Sxe
 
         m e m _ m o d e ; 
 
             aԚ!j_  1   = >   R A M ,   2   = >   F l a s h   M e m o r y 
 
         g r a p h i c ; 
 
             Wb_
T1z gY  9   PW[0
 
 
 
 PV<P
 
         0   - >   O K . 
 
         R e f e r e n c e   A W - E r r o r . t x t   f i l e . 
 
 
 
 {O
 
     V C : 
 
         A _ D e l _ G r a p h i c ( 1 ,   " A A " ) ; 
 
     V B :   V B A :   V B . n e t : 
 
         C a l l   A _ D e l _ G r a p h i c ( 1 ,   " A A " ) 
 
 
 
 f    P  A _ D e l _ G r a p h i c   Qxeg*Rd2QX[(WpSh_j  R A M   b  F l a s h   M e m o r y   gQvWb_
 
         `O8eQvWb_
T1z0vu`O*Rd[_\
NQSFOSN͑e	eQ0
 
 
 
 * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * 
 
 A _ D r a w _ B o x ( ) 
 
 = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = 
 
 R    ku NPFh0
 
 
 
 l
 
     V C : 
 
         i n t   A _ D r a w _ B o x ( c h a r   m o d e ,   i n t   x ,   i n t   y ,   i n t   w i d t h ,   i n t   h e i g h t ,   i n t   t o p ,   i n t   s i d e ) ; 
 
     V B :   V B A : 
 
         D e c l a r e   F u n c t i o n   A _ D r a w _ B o x ( B y V a l   m o d e   A s   B y t e ,   B y V a l   x   A s   L o n g ,   B y V a l   y   A s   L o n g ,   _ 
 
             B y V a l   w i d t h   A s   L o n g ,   B y V a l   h e i g h t   A s   L o n g ,   B y V a l   t o p   A s   L o n g ,   _ 
 
             B y V a l   s i d e   A s   L o n g )   A s   L o n g 
 
     V B . n e t : 
 
         D e c l a r e   F u n c t i o n   A _ D r a w _ B o x ( B y V a l   m o d e   A s   B y t e ,   B y V a l   x   A s   I n t e g e r ,   _ 
 
             B y V a l   y   A s   I n t e g e r ,   B y V a l   w i d t h   A s   I n t e g e r ,   B y V a l   h e i g h t   A s   I n t e g e r ,   _ 
 
             B y V a l   t o p   A s   I n t e g e r ,   B y V a l   s i d e   A s   I n t e g e r )   A s   I n t e g e r 
 
 
 
 Sxe
 
         m o d e ; 
 
             -[/  O R   b  X O R   R0A : X O R 0N : O R ,  N,/f  X O R   x0
 
         x ; 
 
             X   ^j0
 
         y ; 
 
             Y   ^j0
 
         w i d t h ; 
 
             c[Fhv[^{
W0 ^9 9 9 9 0
 
         h e i g h t ; 
 
             c[Fhvؚ^{
W0 ^9 9 9 9 0
 
         t o p ; 
 
             c[FhvS^}hS^{
W0 ^9 9 9 9 0
 
         s i d e ; 
 
             c[FhiQtP}hS^{
W0 ^9 9 9 9 
 
 
 
 PV<P
 
         0   - >   O K . 
 
         R e f e r e n c e   A W - E r r o r . t x t   f i l e . 
 
 
 
 {O
 
     V C : 
 
         A _ D r a w _ B o x ( ' N ' ,   2 6 0 ,   3 0 ,   1 3 0 ,   1 0 5 ,   4 ,   4 ) ; 
 
     V B :   V B A :   V B . n e t : 
 
         C a l l   A _ D r a w _ B o x ( A s c ( " N " ) ,   2 6 0 ,   3 0 ,   1 3 0 ,   1 0 5 ,   4 ,   4 ) 
 
 
 
 f    P  A _ D r a w _ B o x   Qxegku NPl\'`/f  " O R "   b  " X O R "   vFh0
 
 
 
 * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * 
 
 A _ D r a w _ L i n e ( ) 
 
 = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = 
 
 R    ku Nh}0
 
 
 
 l
 
     V C : 
 
         i n t   A _ D r a w _ L i n e ( c h a r   m o d e ,   i n t   x ,   i n t   y ,   i n t   w i d t h ,   i n t   h e i g h t ) ; 
 
     V B :   V B A : 
 
         D e c l a r e   F u n c t i o n   A _ D r a w _ L i n e ( B y V a l   m o d e   A s   B y t e ,   B y V a l   x   A s   L o n g ,   _ 
 
             B y V a l   y   A s   L o n g ,   B y V a l   w i d t h   A s   L o n g ,   B y V a l   h e i g h t   A s   L o n g )   A s   L o n g 
 
     V B . n e t : 
 
         D e c l a r e   F u n c t i o n   A _ D r a w _ L i n e ( B y V a l   m o d e   A s   B y t e ,   B y V a l   x   A s   I n t e g e r ,   _ 
 
             B y V a l   y   A s   I n t e g e r ,   B y V a l   w i d t h   A s   I n t e g e r ,   B y V a l   h e i g h t   A s   I n t e g e r )   A s   I n t e g e r 
 
 
 
 Sxe
 
         m o d e ; 
 
             -[/  O R   b  X O R   R0A   = > X O R 0N   = > O R ,    N,/f  X O R   x0
 
         x ; 
 
             X   ^j0
 
         y ; 
 
             Y   ^j0
 
         w i d t h ; 
 
             c[}hv[^{
W0 ^9 9 9 9 0
 
         h e i g h t ; 
 
             c[}hvؚ^{
W0 ^9 9 9 9 0
 
 
 
 PV<P
 
         0   - >   O K . 
 
         R e f e r e n c e   A W - E r r o r . t x t   f i l e . 
 
 
 
 {O
 
     V C : 
 
         A _ D r a w _ L i n e ( ' A ' ,   2 8 5 ,   7 7 ,   2 ,   3 0 ) ; 
 
     V B :   V B A :   V B . n e t : 
 
         C a l l   A _ D r a w _ L i n e ( A s c ( " A " ) ,   2 8 5 ,   7 7 ,   2 ,   3 0 ) 
 
 
 
 f    P  A _ D r a w _ L i n e   Qxegku NPl\'`/f  " O R "   b  " X O R "   v}h0
 
 
 
 * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * 
 
 A _ F e e d _ L a b e l ( ) 
 
 = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = 
 
 R     N5_jd|0
 
 
 
 l
 
     V C : 
 
         v o i d   A _ F e e d _ L a b e l ( v o i d ) ; 
 
     V B :   V B A :   V B . n e t : 
 
         D e c l a r e   S u b   A _ F e e d _ L a b e l ( ) 
 
 
 
 {O
 
     V C : 
 
         A _ F e e d _ L a b e l ( ) ; 
 
     V B :   V B A :   V B . n e t : 
 
         C a l l   A _ F e e d _ L a b e l ( ) 
 
 
 
 f    P  A _ F e e d _ L a b e l   Qxevu
N/f-[p#~}Bf\gT N5_jd| Nv0Rj,n
 
         Q  g a p   pbk0vu/f-[p#~}BfgT N5_V[w^vjd|0W,g
NQxe
 
         aTe	c  " F e e d "   u N#j0
 
 
 
 * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * 
 
 A _ G e t _ D L L _ V e r s i o n ( ) 
 
 A _ G e t _ D L L _ V e r s i o n A ( ) 
 
     = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = 
 
 R    S_byQdkQxe^Hr,gǌ
0
 
 
 
 l
 
     V C : 
 
         c h a r *   A _ G e t _ D L L _ V e r s i o n ( i n t   n S h o w M e s s a g e ) ; 
 
         i n t   A _ G e t _ D L L _ V e r s i o n A ( i n t   n S h o w M e s s a g e ) ; 
 
     V B :   V B A : 
 
         D e c l a r e   F u n c t i o n   A _ G e t _ D L L _ V e r s i o n ( B y V a l   n S h o w M e s s a g e   A s   L o n g )   A s   L o n g 
 
         D e c l a r e   F u n c t i o n   A _ G e t _ D L L _ V e r s i o n A ( B y V a l   n S h o w M e s s a g e   A s   L o n g )   A s   L o n g 
 
     V B . n e t : 
 
         D e c l a r e   F u n c t i o n   A _ G e t _ D L L _ V e r s i o n ( B y V a l   n S h o w M e s s a g e   A s   I n t e g e r )   A s   S t r i n g 
 
         D e c l a r e   F u n c t i o n   A _ G e t _ D L L _ V e r s i o n A ( B y V a l   n S h o w M e s s a g e   A s   I n t e g e r )   A s   I n t e g e r 
 
 
 
 Sxe
 
         n S h o w M e s s a g e ; 
 
             0   - >   
o`z
Nos. 
 
             1   - >   
o`zos0
 
 
 
 PV<P
 
         A _ G e t _ D L L _ V e r s i o n ( ) ;     PVHr,gǌ
W[2N1YWeGRPV  N U L L 0
 
         A _ G e t _ D L L _ V e r s i o n A ( ) ;     r e t u r n   v e r s i o n   v a l u e . 
 
                                                       ;NHr_  =   ( r e t u r n   v e r s i o n   v a l u e )   /   1 0 0 . 
 
                                                       P[Hr_  =   ( r e t u r n   v e r s i o n   v a l u e )   %   1 0 0 . 
 
 
 
 {O
 
     V C : 
 
         i n t   n V e r s i o n ,   n M a i n V e r s i o n ,   n S u b V e r s i o n ; 
 
         n V e r s i o n   =   A _ G e t _ D L L _ V e r s i o n A ( 1 ) ; 
 
         n M a i n V e r s i o n   =   n V e r s i o n   /   1 0 0 ; 
 
         n S u b V e r s i o n   =   n V e r s i o n   %   1 0 0 ; 
 
     V B :   V B A : 
 
         D i m   n V e r s i o n ,   n M a i n V e r s i o n ,   n S u b V e r s i o n   A s   L o n g 
 
         n V e r s i o n   =   A _ G e t _ D L L _ V e r s i o n A ( 1 ) 
 
         n M a i n V e r s i o n   =   I n t ( n V e r s i o n   /   1 0 0 ) 
 
         n S u b V e r s i o n   =   n V e r s i o n   M o d   1 0 0 
 
     V B . n e t : 
 
         D i m   n V e r s i o n ,   n M a i n V e r s i o n ,   n S u b V e r s i o n   A s   I n t e g e r 
 
         n V e r s i o n   =   A _ G e t _ D L L _ V e r s i o n A ( 1 ) 
 
         n M a i n V e r s i o n   =   n V e r s i o n   /   1 0 0 
 
         n S u b V e r s i o n   =   n V e r s i o n   M o d   1 0 0 
 
 
 
 f    P  A _ G e t _ D L L _ V e r s i o n   QxeO(uS_byQdkQxe^Hr,gǌ
0
 
         1ue  A _ G e t _ D L L _ V e r s i o n ( )   /fVPW[2N,   (W  V B   T  V B A   v|v
N,    O(u  
 
         R t l M o v e M e m o r y ( )   SIc6q_MbS_,   dkQ_(WO(u
N	gbS
Nv㖦^,   
 
         Vdk  V B   T  V B A   v|v^p
NO(udkQ_,   ˊ9e(u  A _ G e t _ D L L _ V e r s i o n A ( ) ,   
 
          N[O(u  A _ G e t _ D L L _ V e r s i o n ( ) ,   ˊS  M S D N . 
 
 
 
 * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * 
 
 A _ G e t _ G r a p h i c ( ) 
 
 = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = 
 
 R    RpS NPWb_&N\Wb_2QX[(WpSh_jgQv  R A M   b  F l a s h   M e m o r y ,   O(u wWj<h_, 
 
                 &TGRg b!qlRpS;   SYB M P <h_vWb_,   vQRpSP}ggHTsS}vHeg,    la0
 
 
 
 l
 
     V C : 
 
         i n t   A _ G e t _ G r a p h i c ( i n t   x ,   i n t   y ,   i n t   m e m _ m o d e ,   c h a r   f o r m a t ,   L P C T S T R   f i l e n a m e ) ; 
 
     V B :   V B A : 
 
         D e c l a r e   F u n c t i o n   A _ G e t _ G r a p h i c ( B y V a l   x   A s   L o n g ,   B y V a l   y   A s   L o n g ,   _ 
 
             B y V a l   m e m _ m o d e   A s   L o n g ,   B y V a l   f o r m a t   A s   B y t e ,   B y V a l   f i l e n a m e   A s   S t r i n g )   A s   L o n g 
 
     V B . n e t : 
 
         D e c l a r e   F u n c t i o n   A _ G e t _ G r a p h i c ( B y V a l   x   A s   I n t e g e r ,   B y V a l   y   A s   I n t e g e r ,   _ 
 
             B y V a l   m e m _ m o d e   A s   I n t e g e r ,   B y V a l   f o r m a t   A s   B y t e ,   _ 
 
             B y V a l   f i l e n a m e   A s   S t r i n g )   A s   I n t e g e r 
 
 
 
 Sxe
 
         x ; 
 
             X   ^j0
 
         y ; 
 
             Y   ^j0
 
         m e m _ m o d e ; 
 
             aԚ!j_  1   = >   R A M ,   2   = >   F l a s h   M e m o r y 
 
             la: F l a s h 	gO(uX}TvP6R, d^Wb_ǌe͑O(u, &TGR^p\Wb_X[0RR A M . 
 
         f o r m a t ; 
 
             Wb_j<h_YNh
 
             + - - - - - - + - - - - - - - - - - - - - - - - - - - - - - - - - - - + - - - - - - - - - + 
 
             | f o r m a t | Wb_j<h_                                  |     eT      | 
 
             + - - - - - - + - - - - - - - - - - - - - - - - - - - - - - - - - - - + - - - - - - - - - + 
 
             |     B       | 1   T  8 - b i t s   B M P   f i l e   f o r m a t |     ck          | 
 
             + - - - - - - + - - - - - - - - - - - - - - - - - - - - - - - - - - - + - - - - - - - - - + 
 
             |     b       | 1   T  8 - b i t s   B M P   f i l e   f o r m a t |                   | 
 
             + - - - - - - + - - - - - - - - - - - - - - - - - - - - - - - - - - - + - - - - - - - - - + 
 
             |     I       | 8 - b i t s   I M G   f i l e   f o r m a t           |     ck          | 
 
             + - - - - - - + - - - - - - - - - - - - - - - - - - - - - - - - - - - + - - - - - - - - - + 
 
             |     i       | 8 - b i t s   I M G   f i l e   f o r m a t           |                   | 
 
             + - - - - - - + - - - - - - - - - - - - - - - - - - - - - - - - - - - + - - - - - - - - - + 
 
             |     P       | 8 - b i t s   P C X   f i l e   f o r m a t           |     ck          | 
 
             + - - - - - - + - - - - - - - - - - - - - - - - - - - - - - - - - - - + - - - - - - - - - + 
 
             |     p       | 8 - b i t s   P C X   f i l e   f o r m a t           |                   | 
 
             + - - - - - - + - - - - - - - - - - - - - - - - - - - - - - - - - - - + - - - - - - - - - +                     
 
         f i l e n a m e ; 
 
             Wb_j
T1zS+T_0
 
             <h_YX X X X X X X X . X X X   b  X : \ \ X X X \ \ X X X . X X X 
 
 
 
 PV<P
 
         0   - >   O K . 
 
         R e f e r e n c e   A W - E r r o r . t x t   f i l e . 
 
 
 
 {O
 
     V C : 
 
         A _ G e t _ G r a p h i c ( 2 7 5 ,   5 0 ,   1 ,   ' B ' ,   " b b . b m p " ) ; 
 
     V B :   V B A :   V B . n e t : 
 
         C a l l   A _ G e t _ G r a p h i c ( 2 7 5 ,   5 0 ,   1 ,   A s c ( " B " ) ,   " b b . b m p " ) 
 
 
 
 f    P  A _ G e t _ G r a p h i c   QxegRpS NPWb_&N\Wb_2QX[(WpSh_jgQv  R A M   b
 
         F l a s h   M e m o r y 0
 
 
 
 * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * 
 
 A _ G e t _ G r a p h i c _ C o l o r B M P ( ) 
 
 A _ G e t _ G r a p h i c _ C o l o r B M P E x ( ) 
 
 A _ G e t _ G r a p h i c _ C o l o r B M P _ H B i t m a p ( ) 
 
 = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = 
 
 R    \  B M P   WjIcbpp!j_&N\Wb_2QX[(WpSh_jgQv  R A M   b  F l a s h   M e m o r y 0
 
 
 
 l
 
     V C : 
 
         i n t   A _ G e t _ G r a p h i c _ C o l o r B M P ( i n t   x ,   i n t   y ,   i n t   m e m _ m o d e ,   c h a r   f o r m a t , 
 
             L P C T S T R   f i l e n a m e ) ; 
 
         i n t   A _ G e t _ G r a p h i c _ C o l o r B M P E x ( i n t   x ,   i n t   y ,   i n t   n W i d t h ,   i n t   n H e i g h t , 
 
             i n t   r o t a t e ,   i n t   m e m _ m o d e ,   c h a r   f o r m a t ,   L P C T S T R   i d _ n a m e ,   L P C T S T R   f i l e n a m e ) ; 
 
         i n t   A _ G e t _ G r a p h i c _ C o l o r B M P _ H B i t m a p ( i n t   x ,   i n t   y ,   i n t   n W i d t h ,   i n t   n H e i g h t , 
 
             i n t   r o t a t e ,   i n t   m e m _ m o d e ,   c h a r   f o r m a t ,   L P C T S T R   i d _ n a m e ,   H B I T M A P   h b m ) ; 
 
     V B :   V B A : 
 
         D e c l a r e   F u n c t i o n   A _ G e t _ G r a p h i c _ C o l o r B M P ( B y V a l   x   A s   L o n g ,   B y V a l   y   A s   L o n g ,   _ 
 
             B y V a l   m e m _ m o d e   A s   L o n g ,   B y V a l   f o r m a t   A s   B y t e ,   B y V a l   f i l e n a m e   A s   S t r i n g )   A s   L o n g 
 
         D e c l a r e   F u n c t i o n   A _ G e t _ G r a p h i c _ C o l o r B M P E x ( B y V a l   x   A s   L o n g ,   _ 
 
             B y V a l   y   A s   L o n g ,   B y V a l   n W i d t h   A s   L o n g ,   B y V a l   n H e i g h t   A s   L o n g ,   _ 
 
             B y V a l   r o t a t e   A s   L o n g ,   B y V a l   m e m _ m o d e   A s   L o n g ,   B y V a l   f o r m a t   A s   B y t e ,   _ 
 
             B y V a l   i d _ n a m e   A s   S t r i n g ,   B y V a l   f i l e n a m e   A s   S t r i n g )   A s   L o n g 
 
         D e c l a r e   F u n c t i o n   A _ G e t _ G r a p h i c _ C o l o r B M P _ H B i t m a p ( B y V a l   x   A s   L o n g ,   _ 
 
             B y V a l   y   A s   L o n g ,   B y V a l   n W i d t h   A s   L o n g ,   B y V a l   n H e i g h t   A s   L o n g ,   _ 
 
             B y V a l   r o t a t e   A s   L o n g ,   B y V a l   m e m _ m o d e   A s   L o n g ,   B y V a l   f o r m a t   A s   B y t e ,   _ 
 
             B y V a l   i d _ n a m e   A s   S t r i n g ,   B y V a l   h b m   A s   L o n g )   A s   L o n g 
 
     V B . n e t : 
 
         D e c l a r e   F u n c t i o n   A _ G e t _ G r a p h i c _ C o l o r B M P ( B y V a l   x   A s   I n t e g e r ,   B y V a l   y   A s   I n t e g e r ,   _ 
 
             B y V a l   m e m _ m o d e   A s   I n t e g e r ,   B y V a l   f o r m a t   A s   B y t e ,   _ 
 
             B y V a l   f i l e n a m e   A s   S t r i n g )   A s   I n t e g e r 
 
         D e c l a r e   F u n c t i o n   A _ G e t _ G r a p h i c _ C o l o r B M P E x ( B y V a l   x   A s   I n t e g e r ,   _ 
 
             B y V a l   y   A s   I n t e g e r ,   B y V a l   n W i d t h   A s   I n t e g e r ,   B y V a l   n H e i g h t   A s   I n t e g e r ,   _ 
 
             B y V a l   r o t a t e   A s   I n t e g e r ,   B y V a l   m e m _ m o d e   A s   I n t e g e r ,   B y V a l   f o r m a t   A s   B y t e ,   _ 
 
             B y V a l   i d _ n a m e   A s   S t r i n g ,   B y V a l   f i l e n a m e   A s   S t r i n g )   A s   I n t e g e r 
 
         D e c l a r e   F u n c t i o n   A _ G e t _ G r a p h i c _ C o l o r B M P _ H B i t m a p ( B y V a l   x   A s   I n t e g e r ,   _ 
 
             B y V a l   y   A s   I n t e g e r ,   B y V a l   n W i d t h   A s   I n t e g e r ,   B y V a l   n H e i g h t   A s   I n t e g e r ,   _ 
 
             B y V a l   r o t a t e   A s   I n t e g e r ,   B y V a l   m e m _ m o d e   A s   I n t e g e r ,   B y V a l   f o r m a t   A s   B y t e ,   _ 
 
             B y V a l   i d _ n a m e   A s   S t r i n g ,   B y V a l   h b m   A s   I n t e g e r )   A s   I n t e g e r 
 
 Sxe
 
         x ; 
 
             X   ^j0
 
         y ; 
 
             Y   ^j0
 
         n W i d t h ; 
 
             dkSxeh:ySW.~>e_vWb_[^0 h:yO(uSW[^0
 
         n H e i g h t ; 
 
             dkSxeh:ySW.~>e_vWb_ؚ^0 h:yO(uSWؚ^0
 
         r o t a t e ; 
 
             dkSxeh:yWb_.~>e_eIveT' 0 ' /f  0  ' 1 ' /f9 0  0' 2 ' /f1 8 0  ' 3 ' /f2 7 0  0
 
         m e m _ m o d e ; 
 
             2QX[MOn  1   = >   R A M ,   2   = >   F l a s h   M e m o r y 
 
             la:   F l a s h 	gO(uX}TvP6R,   d^Wb_ǌe͑O(u,   &TGR^p\Wb_X[0RR A M 0
 
         f o r m a t ; 
 
             Wb_j<h_YNh
 
             + - - - - - - + - - - - - - - - - - - - + - - - - - - - - - + 
 
             | f o r m a t |   Wb_j<h_  |     eT      | 
 
             + - - - - - - + - - - - - - - - - - - - + - - - - - - - - - + 
 
             |     B       |   B M P   f o r m a t   |     ck          | 
 
             + - - - - - - + - - - - - - - - - - - - + - - - - - - - - - + 
 
             |     b       |   B M P   f o r m a t   |                   | 
 
             + - - - - - - + - - - - - - - - - - - - + - - - - - - - - - +                         
 
         i d _ n a m e ; 
 
             f}N NPX%R
T1zX[>eepSh_jgQN_vcO(u  A _ L o a d _ G r a p h i c ( ) sSS\
W|TSQO0
 
         f i l e n a m e ; 
 
             Wb_j
T1zSS+T_0
 
             <h_YX X X X X X X X . X X X   b  X : \ \ X X X \ \ X X X . X X X 
 
         h b m ; 
 
             G D I   v  H B I T M A P   H A N D L E ,   S/ec  I M A G E _ B I T M A P   <h_0
 
             
 
 PV<P
 
         0   - >   O K . 
 
         R e f e r e n c e   A W - E r r o r . t x t   f i l e . 
 
 
 
 {O
 
     V C : 
 
         A _ G e t _ G r a p h i c _ C o l o r B M P ( 3 0 ,   2 0 ,   1 ,   ' B ' ,   " b b . b m p " ) ; 
 
         A _ G e t _ G r a p h i c _ C o l o r B M P E x ( 3 0 ,   2 0 ,   2 0 0 ,   1 5 0 ,   2 ,   1 ,   ' B ' ,   " b b 1 " ,   " b b . b m p " ) ; / / 1 8 0   a n g l e . 
 
         H A N D L E   h i m a g e   =   L o a d I m a g e ( N U L L , " b b . b m p " , I M A G E _ B I T M A P , 0 , 0 , L R _ L O A D F R O M F I L E ) ; 
 
         A _ G e t _ G r a p h i c _ C o l o r B M P _ H B i t m a p ( 3 0 ,   2 0 ,   2 5 0 ,   8 0 ,   1 ,   1 ,   ' B ' ,   " b b 2 " ,   ( H B I T M A P ) h i m a g e ) ; / / 9 0   a n g l e . 
 
     V B :   V B A :   
 
         C o n s t   I M A G E _ B I T M A P   =   0 
 
         C o n s t   L R _ L O A D F R O M F I L E   =   & H 1 0 
 
         P r i v a t e   D e c l a r e   F u n c t i o n   L o a d I m a g e   L i b   " u s e r 3 2 "   A l i a s   " L o a d I m a g e A "   ( B y V a l   h I n s t   A s   L o n g ,   _ 
 
                         B y V a l   l p s z   A s   S t r i n g ,   B y V a l   u n 1   A s   L o n g ,   B y V a l   n 1   A s   L o n g ,   B y V a l   n 2   A s   L o n g ,   _ 
 
                         B y V a l   u n 2   A s   L o n g )   A s   L o n g 
 
         P r i v a t e   D e c l a r e   F u n c t i o n   D e l e t e O b j e c t   L i b   " G d i 3 2 "   ( B y V a l   h o   A s   L o n g )   A s   L o n g 
 
             
 
         C a l l   A _ G e t _ G r a p h i c _ C o l o r B M P ( 3 0 ,   2 0 ,   1 ,   A s c ( " B " ) ,   " b b . b m p " ) ; 
 
         C a l l   A _ G e t _ G r a p h i c _ C o l o r B M P E x ( 3 0 ,   2 0 ,   2 0 0 ,   1 5 0 ,   2 ,   1 ,   A s c ( " B " ) ,   " b b 1 " ,   " b b . b m p " )   '   1 8 0   a n g l e . 
 
         D i m   h i m a g e   A s   L o n g 
 
         h i m a g e   =   L o a d I m a g e ( 0 ,   " b b . b m p " ,   I M A G E _ B I T M A P ,   0 ,   0 ,   L R _ L O A D F R O M F I L E ) 
 
         C a l l   A _ G e t _ G r a p h i c _ C o l o r B M P _ H B i t m a p ( 3 0 ,   2 0 ,   2 5 0 ,   8 0 ,   1 ,   1 ,   A s c ( " B " ) ,   " b b 2 " ,   h i m a g e )   '   9 0   a n g l e . 
 
         I f   h i m a g e   T h e n 
 
                 C a l l   D e l e t e O b j e c t ( h i m a g e ) 
 
         E n d   I f         
 
     V b . n e t : 
 
         C o n s t   I M A G E _ B I T M A P   =   0 
 
         C o n s t   L R _ L O A D F R O M F I L E   =   & H 1 0 
 
         P r i v a t e   D e c l a r e   F u n c t i o n   L o a d I m a g e   L i b   " u s e r 3 2 "   A l i a s   " L o a d I m a g e A "   ( B y V a l   h I n s t   A s   I n t e g e r ,   _ 
 
                         B y V a l   l p s z   A s   S t r i n g ,   B y V a l   u n 1   A s   I n t e g e r ,   B y V a l   n 1   A s   I n t e g e r ,   B y V a l   n 2   A s   I n t e g e r ,   _ 
 
                         B y V a l   u n 2   A s   I n t e g e r )   A s   I n t e g e r 
 
                             
 
         C a l l   A _ G e t _ G r a p h i c _ C o l o r B M P ( 3 0 ,   2 0 ,   1 ,   A s c ( " B " ) ,   " b b . b m p " ) ; 
 
         C a l l   A _ G e t _ G r a p h i c _ C o l o r B M P E x ( 3 0 ,   2 0 ,   2 0 0 ,   1 5 0 ,   2 ,   1 ,   A s c ( " B " ) ,   " b b 1 " ,   " b b . b m p " )   '   1 8 0   a n g l e . 
 
         D i m   h i m a g e   A s   I n t e g e r 
 
         h i m a g e   =   L o a d I m a g e ( 0 ,   " b b . b m p " ,   I M A G E _ B I T M A P ,   0 ,   0 ,   L R _ L O A D F R O M F I L E ) 
 
         C a l l   A _ G e t _ G r a p h i c _ C o l o r B M P _ H B i t m a p ( 3 0 ,   2 0 ,   2 5 0 ,   8 0 ,   1 ,   1 ,   A s c ( " B " ) ,   " b b 2 " ,   h i m a g e )   '   9 0   a n g l e .     
 
 
 
 f    P  A _ G e t _ G r a p h i c _ C o l o r B M P ( )   QxeS8eQNUOMOCQxev  B M P   Wj&NR
 
         Icpў}vppWjpSh_jRpS0
 
         A _ G e t _ G r a p h i c _ C o l o r B M P E x ( )   T  A _ G e t _ G r a p h i c _ C o l o r B M P _ H B i t m a p ( )   QxeSZP>e'Y
 
         .~\SeIvRR%RS)R(uj
TS  G D I   v  H B I T M A P   H A N D L E   vuǌeOn0
 
 
 
 * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * 
 
 A _ I n i t i a l _ S e t t i n g ( ) 
 
 = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = 
 
 R    MRnUt0
 
 
 
 l
 
     V C : 
 
         i n t   A _ I n i t i a l _ S e t t i n g ( i n t   T y p e ,   L P C T S T R   S o u r c e ) ; 
 
     V B :   V B A : 
 
         D e c l a r e   F u n c t i o n   A _ I n i t i a l _ S e t t i n g ( B y V a l   t t y p e   A s   L o n g ,   _ 
 
             B y V a l   S o u r c e   A s   S t r i n g )   A s   L o n g 
 
     V B . n e t : 
 
         D e c l a r e   F u n c t i o n   A _ I n i t i a l _ S e t t i n g ( B y V a l   t t y p e   A s   I n t e g e r ,   _ 
 
             B y V a l   S o u r c e   A s   S t r i n g )   A s   I n t e g e r 
 
 
 
 Sxe
 
         T y p e ; 
 
             xd8eQ!j_<Pp  0   - >   8eQW[2N1   - >   8eQjHh0
 
         S o u r c e ; 
 
             ǌeOnSpW[2NbjHh
T1zS+T_0
 
 
 
 PV<P
 
         0   - >   O K . 
 
         R e f e r e n c e   A W - E r r o r . t x t   f i l e . 
 
 
 
 {O
 
     V C : 
 
         L P C T S T R   a a   =   " 1 2 2 3 0 0 0 0 1 0 0 0 2 0 0 E X A M P L E \ r \ n " ; 
 
         A _ I n i t i a l _ S e t t i n g ( 0 ,   a a ) ; 
 
             o r 
 
         A _ I n i t i a l _ S e t t i n g ( 1 ,   " i n i t f i l e . t x t " ) ; 
 
     V B :   V B A :   V B . n e t : 
 
         D i m   a a   A s   S t r i n g 
 
         a a   =   " 1 2 2 3 0 0 0 0 1 0 0 0 2 0 0 E X A M P L E "   +   C h r ( 1 3 )   +   C h r ( 1 0 ) 
 
         C a l l   A _ I n i t i a l _ S e t t i n g ( 0 ,   a a ) 
 
                               o r 
 
         C a l l   A _ I n i t i a l _ S e t t i n g ( 1 , " i n i t f i l e . t x t " ) 
 
 
 
 f    P  A _ I n i t i a l _ S e t t i n g   QxeMRnUtvR\O/f\ N2N  C o m m a n d   HQpSh
 
         _j1uW[2NbjHh8eQ(WO(uPQxeBfHQ(W  A _ C r e a t e _ P r n ( )   KN_vQN
 
         QxeKNMRS\OpO(uWKa0
 
 
 
 * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * 
 
 A _ W r i t e D a t a ( ) 
 
 = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = 
 
 R    (uOzsS\ǌePQbfBf[eQfX[@S-N0
 
 
 
 l
 
     V C : 
 
         i n t   A _ W r i t e D a t a ( i n t   I s I m m e d i a t e ,   L P C T S T R   p b u f ,   D W O R D   l e n g t h ) ; 
 
     V B :   V B A : 
 
         D e c l a r e   F u n c t i o n   A _ W r i t e D a t a ( B y V a l   I s I m m e d i a t e   A s   L o n g ,   _ 
 
             B y V a l   p b u f   A s   S t r i n g ,   B y V a l   l e n g t h   A s   L o n g )   A s   L o n g     
 
     V B . n e t : 
 
         D e c l a r e   F u n c t i o n   A _ W r i t e D a t a ( B y V a l   I s I m m e d i a t e   A s   I n t e g e r ,   _ 
 
             B y V a l   p b u f   A s   B y t e ( ) ,   B y V a l   l e n g t h   A s   U L o n g )   A s   I n t e g e r 
 
 
 
 Sxe
 
         I s I m m e d i a t e ; 
 
             1 pzsSP,   SPp b u f -NvgQ[8QW; 
 
             0 p\ǌeR0RfX[@S_,   I{|TSA _ P r i n t _ O u t ( )   BfMbP0
 
         p b u f ; 
 
             Pvǌecj0
 
         l e n g t h ; 
 
             p b u f vǌew^0
 
 
 
 PV<P
 
         0   - >   O K . 
 
         R e f e r e n c e   A W - E r r o r . t x t   f i l e . 
 
 
 
 {O
 
     V C : 
 
         c o n s t   c h a r   s z n o p 1 [ ]   =   " n o p _ f r o n t \ r \ n " ; 
 
         c o n s t   c h a r   s z n o p 2 [ ]   =   " n o p _ m i d d l e \ r \ n " ; 
 
         A _ W r i t e D a t a ( 0 ,   s z n o p 2 ,   ( D W O R D ) s t r l e n ( s z n o p 2 ) ) ; 
 
         A _ W r i t e D a t a ( 1 ,   s z n o p 1 ,   ( D W O R D ) s t r l e n ( s z n o p 1 ) ) ; 
 
     V B :   V B A : 
 
         D i m   s z n o p 1   A s   S t r i n g   =   " n o p _ f r o n t "   +   v b C r L f 
 
         D i m   s z n o p 2   A s   S t r i n g   =   " n o p _ m i d d l e "   +   v b C r L f 
 
         C a l l   A _ W r i t e D a t a ( 0 ,   s z n o p 2 ,   L e n ( s z n o p 2 ) ) 
 
         C a l l   A _ W r i t e D a t a ( 1 ,   s z n o p 1 ,   L e n ( s z n o p 1 ) )     
 
     V B . n e t : 
 
         D i m   e n c A s c I I   =   S y s t e m . T e x t . E n c o d i n g . A S C I I 
 
         D i m   s z n o p 1   A s   S t r i n g   =   " n o p _ f r o n t "   +   v b C r L f 
 
         D i m   s z n o p 2   A s   S t r i n g   =   " n o p _ m i d d l e "   +   v b C r L f 
 
         C a l l   A _ W r i t e D a t a ( 0 ,   e n c A s c I I . G e t B y t e s ( s z n o p 2 ) ,   s z n o p 2 . L e n g t h ) 
 
         C a l l   A _ W r i t e D a t a ( 1 ,   e n c A s c I I . G e t B y t e s ( s z n o p 1 ) ,   s z n o p 1 . L e n g t h ) 
 
 
 
 f    dkQ_(uO\O(u`
\pSh_jNTvc6RcNbNUORpSǌe,   vS)R(udk
 
         Q_O[b0
 
 
 
 * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * 
 
 A _ R e a d D a t a ( ) 
 
 = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = 
 
 R    S_pSh_j-Nvǌe0
 
 
 
 l
 
     V C : 
 
         i n t   A _ R e a d D a t a ( L P T S T R   p b u f ,   D W O R D   l e n g t h ,   D W O R D   d w T i m e o u t m s ) ; 
 
     V B :   V B A : 
 
         D e c l a r e   F u n c t i o n   A _ R e a d D a t a ( B y V a l   p b u f   A s   S t r i n g ,   B y V a l   l e n g t h   A s   L o n g ,   _ 
 
             B y V a l   d w T i m e o u t m s   A s   L o n g )   A s   L o n g 
 
     V B . n e t : 
 
         D e c l a r e   F u n c t i o n   A _ R e a d D a t a ( B y V a l   p b u f   A s   B y t e ( ) ,   B y V a l   l e n g t h   A s   U L o n g ,   _ 
 
             B y V a l   d w T i m e o u t m s   A s   U L o n g )   A s   I n t e g e r 
 
 
 
 Sxe
 
         p b u f ; 
 
             c6eVPǌevcj0Yg[/fzzcj,   GR
NkXǌe0
 
         l e n g t h ; 
 
             Svǌe'Y\0
 
         d w T i m e o u t m s ; 
 
             xeBf,   _N1\/fSǌe gwvBf,   UMOpm s 0
 
 
 
 PV<P
 
         ]Svǌe'Y\0
 
 
 
 {O
 
     V C : 
 
         i n t   r e t ; 
 
         c h a r   t e m p [ 1 0 ] = { 0 } ; 
 
         A _ W r i t e D a t a ( 1 ,   " \ x 0 1 \ x 4 6 \ r \ n " ,   4 ) ; / / < S O H > F 
 
         r e t   =   A _ R e a d D a t a ( t e m p ,   2 ,   1 0 0 0 ) ; / / 1   s e c o n d . 
 
     V B :   V B A : 
 
         D i m   r e t   A s   I n t e g e r 
 
         D i m   t e m p   A s   S t r i n g 
 
         t e m p   =   S p a c e ( 1 0 ) 
 
         t e m p   =   C h r ( 1 )   +   C h r ( 7 0 )   +   v b C r L f 
 
         C a l l   A _ W r i t e D a t a ( 1 ,   t e m p ,   4 ) 
 
         r e t   =   A _ R e a d D a t a ( t e m p ,   2 ,   1 0 0 0 )   ' 1   s e c o n d .   
 
     V B . n e t : 
 
         D i m   r e t   A s   I n t e g e r 
 
         D i m   t e m p ( 1 0 )   A s   B y t e 
 
         t e m p ( 0 )   =   & H 1 
 
         t e m p ( 1 )   =   & H 4 6 
 
         t e m p ( 2 )   =   & H D 
 
         t e m p ( 3 )   =   & H A 
 
         C a l l   A _ W r i t e D a t a ( 1 ,   t e m p ,   4 ) 
 
         r e t   =   A _ R e a d D a t a ( t e m p ,   2 ,   1 0 0 0 )   ' 1   s e c o n d . 
 
 
 
 f    dkQ_(uOSpSh_jvVPǌe,   @bNˊlaO(uv
W/f&T	gǌeVPv
 
         R0ˊTA _ W r i t e D a t a ( )   QxeMTO(u,   &NS" A r g o x   p r o g r a m m e r ' s   m a n u a l " 0
 
 
 
 * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * 
 
 A _ L o a d _ G r a p h i c ( ) 
 
 = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = 
 
 R    RpS NP2QX[(WR A M bF l a s h -NvWb_0
 
 
 
 l
 
     V C : 
 
         i n t   A _ L o a d _ G r a p h i c ( i n t   x ,   i n t   y ,   c h a r   g r a p h i c _ n a m e [ 1 0 ] ) ; 
 
     V B :   V B A : 
 
         D e c l a r e   F u n c t i o n   A _ L o a d _ G r a p h i c ( B y V a l   x   A s   L o n g ,   B y V a l   y   A s   L o n g ,   _ 
 
             B y V a l   g r a p h i c _ n a m e   A s   S t r i n g )   A s   L o n g 
 
     V B . n e t : 
 
         D e c l a r e   F u n c t i o n   A _ L o a d _ G r a p h i c ( B y V a l   x   A s   I n t e g e r ,   B y V a l   y   A s   I n t e g e r ,   _ 
 
             B y V a l   g r a p h i c _ n a m e   A s   S t r i n g )   A s   I n t e g e r 
 
 
 
 Sxe
 
         x ; 
 
             X   ^j0
 
         y ; 
 
             Y   ^j0
 
         g r a p h i c _ n a m e ; 
 
             Wb_j
T1z g'Y9 PW[CQ0
 
 
 
 PV<P
 
         0   - >   O K . 
 
         R e f e r e n c e   A W - E r r o r . t x t   f i l e . 
 
 
 
 {O
 
     V C : 
 
         A _ L o a d _ G r a p h i c ( 2 6 5 ,   3 5 ,   " A B " ) ; 
 
     V B :   V B A :   V B . n e t : 
 
         C a l l   A _ L o a d _ G r a p h i c ( 2 6 5 ,   3 5 ,   " A B " ) 
 
 
 
 f    P  A _ L o a d _ G r a p h i c   QxegRpS NPKNMR	eQNvWjWb__NHQ	eQ
 
         pSh_jgQv  R A M   b  f l a s h   m e m o r y   2QX[0
 
 
 
 * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * 
 
 A _ O p e n _ C h i n e s e F o n t ( ) 
 
 = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = 
 
 R    _UO(u-NeޞwcW[WjHh  ( 1 6 * 1 5   T  2 4 * 2 4 ) 0
 
 
 
 l
 
     V C : 
 
         i n t   A _ O p e n _ C h i n e s e F o n t ( c h a r *   p a t h ) ; 
 
     V B :   V B A : 
 
         D e c l a r e   F u n c t i o n   A _ O p e n _ C h i n e s e F o n t ( B y V a l   p a t h   A s   S t r i n g )   A s   L o n g 
 
     V B . n e t : 
 
         D e c l a r e   F u n c t i o n   A _ O p e n _ C h i n e s e F o n t ( B y V a l   p a t h   A s   S t r i n g )   A s   I n t e g e r 
 
 
 
 Sxe
 
         p a t h ; 
 
             -NeޞwcW[WjHhOn_0
 
 
 
 PV<P
 
         0   - >   O K . 
 
         R e f e r e n c e   A W - E r r o r . t x t   f i l e . 
 
 
 
 {O
 
     V C : 
 
         A _ O p e n _ C h i n e s e F o n t ( " C : \ \ E T 3 " ) ; 
 
     V B :   V B A :   V B . n e t : 
 
         C a l l   A _ O p e n _ C h i n e s e F o n t ( " C : \ \ E T 3 " ) ; 
 
 
 
 f    P  A _ O p e n _ C h i n e s e F o n t   Qxe_U-NeޞwcW[WjHh  ( 1 6 * 1 5   T  2 4 * 2 4 ) O
 
         A _ P r n _ T e x t _ C h i n e s e   QxeO(u0
 
 
 
 * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * 
 
 A _ P r i n t _ F o r m ( ) 
 
 = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = 
 
 R    RpS NP  F O R M   ( h<h) &N8eQ  F O R M   v
T1z&N-[[SؚvkOT_!kxe
 
         RpSNxe0
 
 
 
 l
 
     V C : 
 
         i n t   A _ P r i n t _ F o r m ( i n t   w i d t h ,   i n t   h e i g h t ,   i n t   c o p i e s ,   i n t   a m o u n t ,   L P T S T R   f o r m _ n a m e ) ; 
 
     V B :   V B A : 
 
         D e c l a r e   F u n c t i o n   A _ P r i n t _ F o r m ( B y V a l   w i d t h   A s   L o n g ,   B y V a l   h e i g h t   A s   L o n g ,   _ 
 
             B y V a l   c o p i e s   A s   L o n g ,   B y V a l   a m o u n t   A s   L o n g ,   B y V a l   f o r m _ n a m e   A s   S t r i n g )   A s   L o n g 
 
     V B . n e t : 
 
         D e c l a r e   F u n c t i o n   A _ P r i n t _ F o r m ( B y V a l   w i d t h   A s   I n t e g e r ,   B y V a l   h e i g h t   A s   I n t e g e r ,   _ 
 
             B y V a l   c o p i e s   A s   I n t e g e r ,   B y V a l   a m o u n t   A s   I n t e g e r ,   _ 
 
             B y V a l   f o r m _ n a m e   A s   S t r i n g )   A s   I n t e g e r 
 
 
 
 Sxe
 
         w i d t h ; 
 
             [k{
W1   b  2 0
 
         h e i g h t ; 
 
             ؚk{
W1 02   b  3 0
 
         c o p i e s ; 
 
             `O`RpSvNxe{
W1 ^9 9 9 9 0
 
         a m o u n t ; 
 
             c[vxeW[\gOk N_pS~^5_{
W1 ^9 9 0
 
         f o r m _ n a m e ; 
 
             8eQ  F O R M   v
T1zS NPbYP NwFO_(u  " , "   O^R%R@S0
 
 
 
 PV<P
 
         0   - >   O K . 
 
         R e f e r e n c e   A W - E r r o r . t x t   f i l e . 
 
 
 
 {O
 
     V C : 
 
         A _ P r i n t _ F o r m ( 1 ,   1 ,   1 ,   1 ,   " d e m o " ) ; 
 
     V B :   V B A :   V B . n e t : 
 
         C a l l   A _ P r i n t _ F o r m ( 1 ,   1 ,   1 ,   1 ,   " d e m o " ) 
 
 
 
 f    P  A _ P r i n t _ F o r m   Qxeg@b	gǌeSh<h0R  P r i n t e r PQxeO(uMRHQ
 
         WL  A _ S e t _ F o r m ( ) &N(W@b	gQxeKN_A _ C l o s e P r n ( )   KNMRWL0vuO(udkQ
 
         xeBf1\
NWL  A _ P r i n t _ O u t ( ) 0  w i d t h   T  h e i g h t   iQSxe/f-[[ؚ
 
         vkO0vukO-p g'YBfWb_SgV>e'YQsRr0
 
 
 
 * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * 
 
 A _ P r i n t _ O u t ( ) 
 
 = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = 
 
 R    8Q@b	gǌe&N-[[SؚvkOT_!kxeRpSNxe0
 
 
 
 l
 
     V C : 
 
         i n t   A _ P r i n t _ O u t ( i n t   w i d t h ,   i n t   h e i g h t ,   i n t   c o p i e s ,   i n t   a m o u n t ) ; 
 
     V B :   V B A : 
 
         D e c l a r e   F u n c t i o n   A _ P r i n t _ O u t ( B y V a l   w i d t h   A s   L o n g ,   B y V a l   h e i g h t   A s   L o n g ,   _ 
 
             B y V a l   c o p i e s   A s   L o n g ,   B y V a l   a m o u n t   A s   L o n g )   A s   L o n g 
 
     V B . n e t : 
 
         D e c l a r e   F u n c t i o n   A _ P r i n t _ O u t ( B y V a l   w i d t h   A s   I n t e g e r ,   B y V a l   h e i g h t   A s   I n t e g e r ,   _ 
 
             B y V a l   c o p i e s   A s   I n t e g e r ,   B y V a l   a m o u n t   A s   I n t e g e r )   A s   I n t e g e r 
 
 
 
 Sxe
 
         w i d t h ; 
 
             [k{
W1   b  2 0
 
         h e i g h t ; 
 
             ؚk{
W1 02   b  3 0
 
         c o p i e s ; 
 
             `O`RpSvNxe{
W1 ^9 9 9 9 0
 
         a m o u n t ; 
 
             c[vxeW[\gOk N_pS~^5_{
W1 ^9 9 0
 
 
 
 PV<P
 
         0   - >   O K . 
 
         R e f e r e n c e   A W - E r r o r . t x t   f i l e . 
 
 
 
 {O
 
     V C : 
 
         A _ P r i n t _ O u t ( 1 ,   1 ,   3 ,   1 ) ; 
 
     V B :   V B A :   V B . n e t : 
 
         C a l l   A _ P r i n t _ O u t ( 1 ,   1 ,   3 ,   1 ) 
 
 
 
 f    P  A _ P r i n t _ O u t   Qxeg@b	gǌe0R  P r i n t e r PQxeO(u(W@b	gQxeKN
 
         _A _ C l o s e P r n ( )   KNMR0  w i d t h   T  h e i g h t   iQSxe/f-[[ؚvkO0
 
         vukO-p g'YBfWb_SgV>e'YQsRr0  a m o u n t   Sxec[vxe
 
         W[\gO_RkRpS~^5__bn_ N!k0
 
 
 
 * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * 
 
 A _ P r n _ B a r c o d e ( ) 
 
 = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = 
 
 R    pSQ NPhx0
 
 
 
 l
 
     V C : 
 
         i n t   A _ P r n _ B a r c o d e ( i n t   x ,   i n t   y ,   i n t   o r i ,   c h a r   t y p e ,   i n t   n a r r o w ,   i n t   w i d t h , 
 
             i n t   h e i g h t ,   c h a r   m o d e ,   i n t   n u m e r i c ,   L P T S T R   d a t a ) ; 
 
     V B :   V B A : 
 
         D e c l a r e   F u n c t i o n   A _ P r n _ B a r c o d e ( B y V a l   x   A s   L o n g ,   B y V a l   y   A s   L o n g ,   _ 
 
             B y V a l   o r i   A s   L o n g ,   B y V a l   t y p e e   A s   B y t e ,   B y V a l   n a r r o w   A s   L o n g ,   _ 
 
             B y V a l   w i d t h   A s   L o n g ,   B y V a l   h e i g h t   A s   L o n g ,   B y V a l   m o d e   A s   B y t e ,   _ 
 
             B y V a l   n u m e r i c   A s   L o n g ,   B y V a l   d a t a   A s   S t r i n g )   A s   L o n g 
 
     V B . n e t : 
 
         D e c l a r e   F u n c t i o n   A _ P r n _ B a r c o d e ( B y V a l   x   A s   I n t e g e r ,   B y V a l   y   A s   I n t e g e r ,   _ 
 
             B y V a l   o r i   A s   I n t e g e r ,   B y V a l   t y p e e   A s   B y t e ,   B y V a l   n a r r o w   A s   I n t e g e r ,   _ 
 
             B y V a l   w i d t h   A s   I n t e g e r ,   B y V a l   h e i g h t   A s   I n t e g e r ,   B y V a l   m o d e   A s   B y t e ,   _ 
 
             B y V a l   n u m e r i c   A s   I n t e g e r ,   B y V a l   d a t a   A s   S t r i n g )   A s   I n t e g e r 
 
 
 
 Sxe
 
         x ; 
 
             X   ^j0
 
         y ; 
 
             Y   ^j0
 
         o r i ; 
 
             RpSeT[MO1 : 0  02 : 9 0  03 : 1 8 0  04 : 2 7 0  
 
         t y p e ; 
 
             B a r   c o d e   W_0YNh
 
             + = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = + 
 
             | hxW_        | ǌew^    | j,n  | o:yǌ    | υǌe      | ǌel\'`          | hxkO  | 
 
             |                         |                     | x      | e            | ( T y p e )           |                           |                   | 
 
             |                         |                     |           | ( T y p e )     |                       |                           |                   | 
 
             + = = = = = = = = = = = = + = = = = = = = = = = + = = = = = + = = = = = = = = + = = = = = = = = = = = + = = = = = = = = = = = = = + = = = = = = = = = + 
 
             | C o d e   3   o f   9   | v a r i a b l e     | n o       | ' A '           | ' a '                 | 0 ~ 9 , A ~ Z , $ % * + - | 2 : 1 ~           | 
 
             |                         |                     |           |                 |                       | . / a n d   s p a c e     | 3 : 1             | 
 
             + - - - - - - - - - - - - + - - - - - - - - - - + - - - - - + - - - - - - - - + - - - - - - - - - - - + - - - - - - - - - - - - - + - - - - - - - - - + 
 
             | U P C - A               | 1 2   d i g i s     | y e s     | ' B '           | ' b '                 | 0 ~ 9                     | 2 : 3 : 4         | 
 
             |                         | ( 1 1 + 1 )         |           |                 |                       |                           |                   | 
 
             + - - - - - - - - - - - - + - - - - - - - - - - + - - - - - + - - - - - - - - + - - - - - - - - - - - + - - - - - - - - - - - - - + - - - - - - - - - + 
 
             | U P C - E               | 7   d i g i t s     | y e s     | ' C '           | ' c '                 | 0 ~ 9                     | 2 : 3 : 4         | 
 
             |                         | ( 6 + 1 )           |           |                 |                       |                           |                   | 
 
             + - - - - - - - - - - - - + - - - - - - - - - - + - - - - - + - - - - - - - - + - - - - - - - - - - - + - - - - - - - - - - - - - + - - - - - - - - - + 
 
             | I n t e r l e a v e d   | v a r i a b l e     | n o       | ' D '           | ' d '                 | 0 ~ 9                     | 2 : 1 ~           | 
 
             | 2   o f   5   ( I 2 5 ) |                     |           |                 |                       |                           | 3 : 1             | 
 
             + - - - - - - - - - - - - + - - - - - - - - - - + - - - - - + - - - - - - - - + - - - - - - - - - - - + - - - - - - - - - - - - - + - - - - - - - - - + 
 
             | C o d e   1 2 8         | v a r i a b l e     | y e s     | ' E '           | ' e '                 | f o r m   c o d e   0     | 2 : 3 : 4         | 
 
             |                         |                     |           |                 |                       | t o   1 2 7 ( ;1 )     |                   | 
 
             + - - - - - - - - - - - - + - - - - - - - - - - + - - - - - + - - - - - - - - + - - - - - - - - - - - + - - - - - - - - - - - - - + - - - - - - - - - + 
 
             | E A N - 1 3             | 1 3   d i g i t s   | y e s     | ' F '           | ' f '                 | 0 ~ 9                     | 2 : 3 : 4         | 
 
             |                         | ( 1 2 + 1 )         |           |                 |                       |                           |                   | 
 
             + - - - - - - - - - - - - + - - - - - - - - - - + - - - - - + - - - - - - - - + - - - - - - - - - - - + - - - - - - - - - - - - - + - - - - - - - - - + 
 
             | E N A - 8               | 8   d i g i t s     | y e s     | ' G '           | ' g '                 | 0 ~ 9                     | 2 : 3 : 4         | 
 
             |                         | ( 7 + 1 )           |           |                 |                       |                           |                   | 
 
             + - - - - - - - - - - - - + - - - - - - - - - - + - - - - - + - - - - - - - - + - - - - - - - - - - - + - - - - - - - - - - - - - + - - - - - - - - - + 
 
             | H B I C                 | v a r i a b l e     | y e s     | ' H '           | ' h '                 | 0 ~ 9 , A ~ Z , $ % * + - | 2 : 1 ~           | 
 
             |                         |                     |           |                 |                       | . / a n d   s p a c e     | 3 : 1             | 
 
             + - - - - - - - - - - - - + - - - - - - - - - - + - - - - - + - - - - - - - - + - - - - - - - - - - - + - - - - - - - - - - - - - + - - - - - - - - - + 
 
             | C o d a   b a r         | a t   l e a s t   3 | n o       | ' I '           | ' i '                 | 0 ~ 9 , A ~ Z , $ + - .   | 2 : 1 ~           | 
 
             |                         | c h a r a c t e r s |           |                 |                       | A n d   /                 | 3 : 1             | 
 
             + - - - - - - - - - - - - + - - - - - - - - - - + - - - - - + - - - - - - - - + - - - - - - - - - - - + - - - - - - - - - - - - - + - - - - - - - - - + 
 
             | I n t e r l e a v e d   | v a r i a b l e     | y e s     | ' J '           | ' j '                 | 0 ~ 9                     | 2 : 1 ~           | 
 
             | 2   o f   5   w i t h   + - - - - - - - - - - +           |                 |                       |                           | 3 : 1             | 
 
             | a   m o d u l o   1 0   c h e c k s u m       |           |                 |                       |                           |                   | 
 
             + - - - - - - - - - - - - - - - - - - - - - - - + - - - - - + - - - - - - - - + - - - - - - - - - - - + - - - - - - - - - - - - - + - - - - - - - - - + 
 
             | P l e s s e y           | 1 ~ 1 4             | y e s     | ' K '           | ' k '                 | 0 ~ 9                     | 2 : 1 ~           | 
 
             |                         | d i g i t s         |           |                 |                       |                           | 3 : 1             | 
 
             + - - - - - - - - - - - - + - - - - - - - - - - + - - - - - + - - - - - - - - + - - - - - - - - - - - + - - - - - - - - - - - - - + - - - - - - - - - + 
 
             | I n t e r l e a v e d   | v a r i a b l e     | y e s     | ' L '           | ' l '                 | 0 ~ 9                     | 2 : 1 ~           | 
 
             | 2   o f   5   w i t h   + - - - - - - - - - - + - - - - - + - - - - - - - - + - - - - - - - - - - - +                           | 3 : 1             | 
 
             | a   m o d u l o   1 0   c h e c k s u m   a n d   s h i p p i n g   b e a r e r   b a r s           |                           |                   | 
 
             + - - - - - - - - - - - - + - - - - - - - - - - + - - - - - + - - - - - - - - + - - - - - - - - - - - + - - - - - - - - - - - - - + - - - - - - - - - + 
 
             | U P C 2                 | 2   d i g i t s     | n o       | ' M '           | ' m '                 | 0 ~ 9                     | 2 : 3 : 4         | 
 
             + - - - - - - - - - - - - + - - - - - - - - - - + - - - - - + - - - - - - - - + - - - - - - - - - - - + - - - - - - - - - - - - - + - - - - - - - - - + 
 
             | U P C 5                 | 5   d i g i t s     | n o       | ' N '           | ' n '                 | 0 ~ 9                     | 2 : 3 : 4         | 
 
             + - - - - - - - - - - - - + - - - - - - - - - - + - - - - - + - - - - - - - - + - - - - - - - - - - - + - - - - - - - - - - - - - + - - - - - - - - - + 
 
             | C o d e   9 3           | v a r i a b l e     | n o       | ' O '           | ' o '                 | 0 ~ 9 , A ~ Z , $ % * + - | 2 : 3 : 4         | 
 
             |                         |                     |           |                 |                       | . / a n d   s p a c e     |                   | 
 
             + - - - - - - - - - - - - + - - - - - - - - - - + - - - - - + - - - - - - - - + - - - - - - - - - - - + - - - - - - - - - - - - - + - - - - - - - - - + 
 
             | P o s t n e t           | v a r i a b l e     | y e s     | n o t           | ' p '                 | 0 ~ 9                     |                   | 
 
             |                         |                     |           | d e f i n e d   |                       |                           |                   | 
 
             + - - - - - - - - - - - - + - - - - - - - - - - + - - - - - + - - - - - - - - + - - - - - - - - - - - + - - - - - - - - - - - - - + - - - - - - - - - + 
 
             | U C C / E A N   C o d e | 2 0   d i g i t s   | y e s     | ' Q '           | ' q '                 | 0 ~ 9                     | 2 : 3 : 4         | 
 
             | 1 2 8                   | ( 1 9 + 1 )         |           |                 |                       |                           |                   | 
 
             + - - - - - - - - - - - - + - - - - - - - - - - + - - - - - + - - - - - - - - + - - - - - - - - - - - + - - - - - - - - - - - - - + - - - - - - - - - + 
 
             | U C C / E A N   C o d e | 1 8   d i g i t s   | y e s     | ' R '           | ' r '                 | 0 ~ 9                     | 2 : 3 : 4         | 
 
             | 1 2 8   k - M A R T     |                     |           |                 |                       |                           |                   | 
 
             + - - - - - - - - - - - - + - - - - - - - - - - + - - - - - + - - - - - - - - + - - - - - - - - - - - + - - - - - - - - - - - - - + - - - - - - - - - + 
 
             | U C C / E A N   C o d e | v a r i a b l e     | y e s     | ' S '           | ' s '                 | 0 ~ 9                     | 2 : 3 : 4         | 
 
             | 1 2 8   R a n d o m     |                     |           |                 |                       |                           |                   | 
 
             | w e i g h t             |                     |           |                 |                       |                           |                   | 
 
             + - - - - - - - - - - - - + - - - - - - - - - - + - - - - - + - - - - - - - - + - - - - - - - - - - - + - - - - - - - - - - - - - + - - - - - - - - - + 
 
             | T e l e p e n           | v a r i a b l e     | y e s     | ' T '           | ' t '                 | f o r m   c o d e   0     | 2 : 3 : 4         | 
 
             |                         |                     |           |                 |                       | t o   1 2 7               |                   | 
 
             + - - - - - - - - - - - - + - - - - - - - - - - + - - - - - + - - - - - - - - + - - - - - - - - - - - + - - - - - - - - - - - - - + - - - - - - - - - + 
 
             | F I M                   | 1                   | n o       | n o t           | ' v '                 | A , B , C   a n d   D     |                   | 
 
             |                         | c h a r a c t e r   |           | d e f i n e d   |                       |                           |                   | 
 
             + - - - - - - - - - - - - + - - - - - - - - - - + - - - - - + - - - - - - - - + - - - - - - - - - - - + - - - - - - - - - - - - - + - - - - - - - - - + 
 
             ;1 dk  C o d e   1 2 8   /ecP[Ɩ  A B   T  C 0dk-vvP[Ɩp  B ;   dkYǌekv
 
                       YW[CQ  ( A B C )   zl[P[ƖpUO0VdkpN2bkǌe$Rˊe`OvǌeMRbMY
 
                       ReQ NPW[CQ  ( A B C ) 0
 
                       OYP[Ɩ  =   B 
 
                                   hxǌe  =   " B a r   c o d e " 
 
                                   8Q  =   " B B a r   c o d e " 
 
             P;ˊSA R G O X   P P L A   P r o g r a m m e r   M a n u a l -Nv,{A 1 0 . P R O G R A M M I N G   E X A M P L E S   F O R   B A R   C O D E S {
 
         n a r r o w ; 
 
             N A R R O W   b a r   [^{
W  0 ^2 4 0
 
         w i d t h ; 
 
             W I D E   b a r   [^{
W  0 ^2 4 0
 
             P;n a r r o w   T  w i d t h   v<P_Sh<h
NvhxkO0
 
         h e i g h t ; 
 
             B a r   c o d e   ؚ^{
W  0 ^9 9 9 0
 
         m o d e ; 
 
             DRRYNh
 
             + - - - - + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + 
 
             | m o d e |                       Rf                                    | 
 
             + - - - - + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + 
 
             |   A     | 
\xeW[RXR_.                                     | 
 
             + - - - - + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + 
 
             |   B     | 
\W[kRXR_.                                     | 
 
             + - - - - + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + 
 
             |   C     | 
\xeW[Rn\_.                                     | 
 
             + - - - - + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + 
 
             |   D     | 
\W[kRn\_.                                     | 
 
             + - - - - + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + 
 
             |   N     | !qNUOR.                                                 | 
 
             + - - - - + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +                     
 
         n u m e r i c ; 
 
             RXRbn\_ϑ0{
W0 ^9 9 . 
 
             vu	gDRRBfdkkMO_X[(W0
 
         d a t a ; 
 
             ǌeW[2N0
 
 
 
 PV<P
 
         0  0- >   O K . 
 
         R e f e r e n c e   A W - E r r o r . t x t   f i l e . 
 
 
 
 {O
 
     V C : 
 
         A _ P r n _ B a r c o d e ( 1 5 0 ,   2 0 ,   4 ,   ' A ' ,   0 ,   0 ,   2 0 ,   ' B ' ,   1 ,   " A B C D " ) ; 
 
     V B :   V B A :   V B . n e t : 
 
         C a l l   A _ P r n _ B a r c o d e ( 1 5 0 ,   2 0 ,   4 ,   A s c ( " A " ) ,   0 ,   0 ,   2 0 ,   A s c ( " B " ) ,   1 ,   " A B C D " ) 
 
 
 
 f    P  A _ P r n _ B a r c o d e   QxeSNRpSQ NPyr[  B a r c o d e 0
 
 
 
 * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * 
 
 A _ P r n _ T e x t ( ) 
 
 = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = 
 
 R    pSQ NLeW[0
 
 
 
 l
 
     V C : 
 
         i n t   A _ P r n _ T e x t ( i n t   x ,   i n t   y ,   i n t   o r i ,   i n t   f o n t ,   i n t   t y p e ,   i n t   h o r _ f a c t o r , 
 
                 i n t   v e r _ f a c t o r ,   c h a r   m o d e ,   i n t   n u m e r i c ,   L P C T S T R   d a t a ) ; 
 
     V B :   V B A : 
 
         D e c l a r e   F u n c t i o n   A _ P r n _ T e x t ( B y V a l   x   A s   L o n g ,   B y V a l   y   A s   L o n g ,   B y V a l   o r i   A s   L o n g ,   _ 
 
             B y V a l   f o n t   A s   L o n g ,   B y V a l   t y p e e   A s   L o n g ,   B y V a l   h o r _ f a c t o r   A s   L o n g ,   _ 
 
             B y V a l   v e r _ f a c t o r   A s   L o n g ,   B y V a l   m o d e   A s   B y t e ,   B y V a l   n u m e r i c   A s   L o n g ,   _ 
 
             B y V a l   d a t a   A s   S t r i n g )   A s   L o n g 
 
     V B . n e t : 
 
         D e c l a r e   F u n c t i o n   A _ P r n _ T e x t ( B y V a l   x   A s   I n t e g e r ,   B y V a l   y   A s   I n t e g e r ,   _ 
 
             B y V a l   o r i   A s   I n t e g e r ,   B y V a l   f o n t   A s   I n t e g e r ,   B y V a l   t y p e e   A s   I n t e g e r ,   _ 
 
             B y V a l   h o r _ f a c t o r   A s   I n t e g e r ,   B y V a l   v e r _ f a c t o r   A s   I n t e g e r ,   B y V a l   m o d e   A s   B y t e ,   _ 
 
             B y V a l   n u m e r i c   A s   I n t e g e r ,   B y V a l   d a t a   A s   S t r i n g )   A s   I n t e g e r 
 
 
 
 Sxe
 
         x ; 
 
             X   ^j0
 
         y ; 
 
             Y   ^j0
 
         o r i ; 
 
             RpSeT[MO1 : 0  02 : 9 0  03 : 1 8 0  04 : 2 7 0  
 
         f o n t ; 
 
             W[WW_YNh
 
             P;gW[Wh  A R G O X   U s e r ' s   M a n u a l 
 
         t y p e ; 
 
             Nh
 
             + - - - - - - - - - - - - - - + - - - - - + - - - - - - - - - - - - - - - - - - - - - - - - - - - + 
 
             | f o n t                     | t y p e   | F o n t   T y p e                                     | 
 
             + - - - - - - - - - - - - - - + - - - - - + - - - - - - - - - - - - - - - - - - - - - - - - - - - + 
 
             | 0 , 1 , 2 , 3 , 4 , 5 , 6 , | 0         | f o n t   0 ~ f o n t   8   r e s p e c t i v e l y . | 
 
             | 7 , 8                       |           |                                                       | 
 
             + - - - - - - - - - - - - - - + - - - - - + - - - - - - - - - - - - - - - - - - - - - - - - - - - + 
 
             | 9                           | 0 ~ 7     | A S D   s m o o t h   f o n t s .                     | 
 
             |                             |           | 0 : 4 p o i n t s ,     1 : 6 p o i n t s ,           | 
 
             |                             |           | 2 : 8 p o i n t s ,     3 : 1 0 p o i n t s ,         | 
 
             |                             |           | 4 : 1 2 p o i n t s ,   5 : 1 4 p o i n t s ,         | 
 
             |                             |           | 6 : 1 8 p o i n t s .                                 | 
 
             + - - - - - - - - - - - - - - + - - - - - + - - - - - - - - - - - - - - - - - - - - - - - - - - - + 
 
             | 9                           | x x x     | P C L   s o f t   f o n t .                           | 
 
             |                             |           | x x x   :   s o f t   f o n t   I D   w i t h         | 
 
             |                             |           |             3   d i g i t s                           | 
 
             + - - - - - - - - - - - - - - + - - - - - + - - - - - - - - - - - - - - - - - - - - - - - - - - - + 
 
             | 1 1                         | 0 ~ 7     | C o u r i e r   f o n t s , ( 0   r e p r e s e n t s | 
 
             |                             |           | s y m b o l   s e t )                                 | 
 
             |                             |           | 0 : R o m a n - 8 ,     1 : E C M A - 9 4 ,           | 
 
             |                             |           | 2 : P C   s e t ,       3 : P C   s e t   A ,         | 
 
             |                             |           | 4 : P C   s e t   B ,   5 : L e g a l ,               | 
 
             |                             |           | 6 : G r e e k ,         7 : R u s s i a n .           | 
 
             + - - - - - - - - - - - - - - + - - - - - + - - - - - - - - - - - - - - - - - - - - - - - - - - - + 
 
             | 1 2                         | 0         | F o n t   s e l e c t i o n   f o r m   f o n t       | 
 
             |                             |           | b o a r d .                                           | 
 
             + - - - - - - - - - - - - - - + - - - - - + - - - - - - - - - - - - - - - - - - - - - - - - - - - + 
 
         h o r _ f a c t o r ; 
 
             4ls^>e'YkO{
W0 ^2 4 , 0 P r i n t e r   d e f u a u l t 0
 
         v e r _ f a c t o r ; 
 
             Wv>e'YkO{
W0 ^2 4 , 0 P r i n t e r   d e f u a u l t 0
 
         m o d e ; 
 
             DRRYNh
 
             + - - - - + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + 
 
             | m o d e |                       Rf                                    | 
 
             + - - - - + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + 
 
             |   A     | 
\xeW[RXR_.                                     | 
 
             + - - - - + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + 
 
             |   B     | 
\W[kRXR_.                                     | 
 
             + - - - - + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + 
 
             |   C     | 
\xeW[Rn\_.                                     | 
 
             + - - - - + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + 
 
             |   D     | 
\W[kRn\_.                                     | 
 
             + - - - - + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + 
 
             |   M     | bS\!j_.                                                 | 
 
             + - - - - + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + 
 
             |   N     | !qNUOR.                                                 | 
 
             + - - - - + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + 
 
         n u m e r i c ; 
 
             RXRbn\_ϑ0{
W0 ^9 9 
 
             vu	gDRRBfdkkMO_X[(W0
 
         d a t a ; 
 
             ǌeW[2N0
 
 
 
 PV<P
 
         0   - >   O K . 
 
         R e f e r e n c e   A W - E r r o r . t x t   f i l e . 
 
 
 
 {O
 
     V C : 
 
         A _ P r n _ T e x t ( 3 1 0 ,   3 5 ,   1 ,   9 ,   0 ,   1 ,   1 ,   ' N ' ,   2 ,   " P P L A   C O M M A N D " ) ; 
 
     V B :   V B A :   V B . n e t : 
 
         C a l l   A _ P r n _ T e x t ( 3 1 0 ,   3 5 ,   1 ,   9 ,   0 ,   1 ,   1 ,   A s c ( " N " ) ,   2 ,   " P P L A   C O M M A N D " ) 
 
 
 
 f    P  A _ P r n _ T e x t   QxeSNRpSQ NLeW[0
 
 
 
 * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * 
 
 A _ P r n _ T e x t _ C h i n e s e ( ) 
 
 = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = 
 
 R    pSQ NLeW[O(u-NeޞwcW[WjHh  ( 1 6 * 1 5   b  2 4 * 2 4 ) 0
 
 
 
 l
 
     V C : 
 
         i n t   A _ P r n _ T e x t _ C h i n e s e ( i n t   x ,   i n t   y ,   i n t   f o n t t y p e ,   L P C T S T R   i d _ n a m e ,   
 
             L P C T S T R   d a t a ,   i n t   m e m _ m o d e ) ; 
 
     V B :   V B A : 
 
         D e c l a r e   F u n c t i o n   A _ P r n _ T e x t _ C h i n e s e ( B y V a l   x   A s   L o n g ,   B y V a l   y   A s   L o n g ,   _ 
 
             B y V a l   f o n t t y p e   A s   L o n g ,   B y V a l   i d _ n a m e   A s   S t r i n g ,   B y V a l   d a t a   A s   S t r i n g ,   _ 
 
             B y V a l   m e m _ m o d e   A s   L o n g )   A s   L o n g 
 
     V B . n e t : 
 
         D e c l a r e   F u n c t i o n   A _ P r n _ T e x t _ C h i n e s e ( B y V a l   x   A s   I n t e g e r ,   B y V a l   y   A s   I n t e g e r ,   _ 
 
             B y V a l   f o n t t y p e   A s   I n t e g e r ,   B y V a l   i d _ n a m e   A s   S t r i n g ,   B y V a l   d a t a   A s   S t r i n g ,   _ 
 
             B y V a l   m e m _ m o d e   A s   I n t e g e r )   A s   I n t e g e r 
 
 
 
 Sxe
 
         x ; 
 
             X   ^j0( d o t ) 
 
         y ; 
 
             Y   ^j0( d o t ) 
 
         f o n t t y p e ; 
 
             wcW[Wxd00   - >   1 6 * 1 5 01   - >   2 4 * 2 4 0
 
         i d _ n a m e ; 
 
             f}N NPX%R
T1zX[>eepSh_jgQN_vcO(u  A _ L o a d _ G r a p h i c ( )   sSS\
W|TSQO0
 
         d a t a ; 
 
             eW[gQ[0
 
         m e m _ m o d e ; 
 
             aԚ!j_  1   = >   R A M ,   2   = >   F l a s h   M e m o r y 
 
             la: F l a s h 	gO(uX}TvP6R, d^Wb_ǌe͑O(u, &TGR^p\Wb_X[0RR A M 
 
 
 
 PV<P
 
         0   - >   O K . 
 
         R e f e r e n c e   A W - E r r o r . t x t   f i l e . 
 
 
 
 {O
 
     V C : 
 
         A _ O p e n _ C h i n e s e F o n t ( " C : \ \ E T 3 " ) ; 
 
         A _ P r n _ T e x t _ C h i n e s e ( 1 0 0 ,   1 0 0 ,   0 ,   " A 0 1 " ,   " W[)RvvuMR!B#C$D" ,   1 ) ; 
 
     V B :   V B A :   V B . n e t : 
 
         C a l l   A _ O p e n _ C h i n e s e F o n t ( " C : \ \ E T 3 " ) 
 
         C a l l   A _ P r n _ T e x t _ C h i n e s e ( 1 0 0 ,   1 0 0 ,   0 ,   " A 0 1 " ,   " W[)RvvuMR!B#C$D" ,   1 ) 
 
 
 
 f    P  A _ P r n _ T e x t _ C h i n e s e   QxeSNpSQ NLeW[O(u-NeޞwcW[WjHh
 
         ( 1 6 * 1 5   b  2 4 * 2 4 ) 0
 
 
 
 * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * 
 
 A _ P r n _ T e x t _ T r u e T y p e ( ) 
 
 A _ P r n _ T e x t _ T r u e T y p e _ W ( ) 
 
 A _ P r n _ T e x t _ T r u e T y p e _ U n i ( ) 
 
 A _ P r n _ T e x t _ T r u e T y p e _ U n i B ( ) 
 
 = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = 
 
 R    pSQ NL  T r u e   T y p e   F o n t   eW[0
 
 
 
 l
 
     V C : 
 
         i n t   A _ P r n _ T e x t _ T r u e T y p e ( i n t   x ,   i n t   y ,   i n t   F S i z e ,   L P C T S T R   F T y p e ,   i n t   F s p i n , 
 
             i n t   F W e i g h t ,   i n t   F I t a l i c ,   i n t   F U n l i n e ,   i n t   F S t r i k e O u t ,   L P C T S T R   i d _ n a m e , 
 
             L P C T S T R   d a t a ,   i n t   m e m _ m o d e ) ; 
 
         i n t   A _ P r n _ T e x t _ T r u e T y p e _ W ( i n t   x ,   i n t   y ,   i n t   F H e i g h t ,   i n t   F W i d t h ,   L P C T S T R   F T y p e , 
 
             i n t   F s p i n ,   i n t   F W e i g h t ,   i n t   F I t a l i c ,   i n t   F U n l i n e ,   i n t   F S t r i k e O u t , 
 
             L P C T S T R   i d _ n a m e ,   L P C T S T R   d a t a ,   i n t   m e m _ m o d e ) ; 
 
         i n t   A _ P r n _ T e x t _ T r u e T y p e _ U n i ( i n t   x ,   i n t   y ,   i n t   F S i z e ,   L P C T S T R   F T y p e ,   i n t   F s p i n , 
 
             i n t   F W e i g h t ,   i n t   F I t a l i c ,   i n t   F U n l i n e ,   i n t   F S t r i k e O u t ,   L P C T S T R   i d _ n a m e , 
 
             L P C W S T R   d a t a ,   i n t   f o r m a t ,   i n t   m e m _ m o d e ) ; 
 
         i n t   A _ P r n _ T e x t _ T r u e T y p e _ U n i B ( i n t   x ,   i n t   y ,   i n t   F S i z e ,   L P C T S T R   F T y p e ,   i n t   F s p i n , 
 
             i n t   F W e i g h t ,   i n t   F I t a l i c ,   i n t   F U n l i n e ,   i n t   F S t r i k e O u t ,   L P C T S T R   i d _ n a m e ,   
 
             L P C T S T R   d a t a ,   i n t   f o r m a t ,   i n t   m e m _ m o d e ) ; 
 
     V B :   V B A : 
 
         D e c l a r e   F u n c t i o n   A _ P r n _ T e x t _ T r u e T y p e ( B y V a l   x   A s   L o n g ,   B y V a l   y   A s   L o n g ,   _ 
 
             B y V a l   F S i z e   A s   L o n g ,   B y V a l   F T y p e   A s   S t r i n g ,   B y V a l   F s p i n   A s   L o n g ,   _ 
 
             B y V a l   F W e i g h t   A s   L o n g ,   B y V a l   F I t a l i c   A s   L o n g ,   B y V a l   F U n l i n e   A s   L o n g ,   _ 
 
             B y V a l   F S t r i k e O u t   A s   L o n g ,   B y V a l   i d _ n a m e   A s   S t r i n g ,   B y V a l   d a t a   A s   S t r i n g ,   _ 
 
             B y V a l   m e m _ m o d e   A s   L o n g )   A s   L o n g 
 
         D e c l a r e   F u n c t i o n   A _ P r n _ T e x t _ T r u e T y p e _ W ( B y V a l   x   A s   L o n g ,   B y V a l   y   A s   L o n g ,   _ 
 
             B y V a l   F H e i g h t   A s   L o n g ,   B y V a l   F W i d t h   A s   L o n g ,   B y V a l   F T y p e   A s   S t r i n g ,   _ 
 
             B y V a l   F s p i n   A s   L o n g ,   B y V a l   F W e i g h t   A s   L o n g ,   B y V a l   F I t a l i c   A s   L o n g ,   _ 
 
             B y V a l   F U n l i n e   A s   L o n g ,   B y V a l   F S t r i k e O u t   A s   L o n g ,   B y V a l   i d _ n a m e   A s   S t r i n g ,   _ 
 
             B y V a l   d a t a   A s   S t r i n g ,   B y V a l   m e m _ m o d e   A s   L o n g )   A s   L o n g 
 
         D e c l a r e   F u n c t i o n   A _ P r n _ T e x t _ T r u e T y p e _ U n i ( B y V a l   x   A s   L o n g ,   B y V a l   y   A s   L o n g ,   _ 
 
             B y V a l   F S i z e   A s   L o n g ,   B y V a l   F T y p e   A s   S t r i n g ,   B y V a l   F s p i n   A s   L o n g ,   _ 
 
             B y V a l   F W e i g h t   A s   L o n g ,   B y V a l   F I t a l i c   A s   L o n g ,   B y V a l   F U n l i n e   A s   L o n g ,   _ 
 
             B y V a l   F S t r i k e O u t   A s   L o n g ,   B y V a l   i d _ n a m e   A s   S t r i n g ,   B y R e f   d a t a   A s   B y t e ,   _ 
 
             B y V a l   f o r m a t   A s   L o n g ,   B y V a l   m e m _ m o d e   A s   L o n g )   A s   L o n g 
 
         D e c l a r e   F u n c t i o n   A _ P r n _ T e x t _ T r u e T y p e _ U n i B ( B y V a l   x   A s   L o n g ,   B y V a l   y   A s   L o n g ,   _ 
 
             B y V a l   F S i z e   A s   L o n g ,   B y V a l   F T y p e   A s   S t r i n g ,   B y V a l   F s p i n   A s   L o n g ,   _ 
 
             B y V a l   F W e i g h t   A s   L o n g ,   B y V a l   F I t a l i c   A s   L o n g ,   B y V a l   F U n l i n e   A s   L o n g ,   _ 
 
             B y V a l   F S t r i k e O u t   A s   L o n g ,   B y V a l   i d _ n a m e   A s   S t r i n g ,   B y R e f   d a t a   A s   B y t e ,   _ 
 
             B y V a l   f o r m a t   A s   L o n g ,   B y V a l   m e m _ m o d e   A s   L o n g )   A s   L o n g 
 
     V B . n e t : 
 
         D e c l a r e   F u n c t i o n   A _ P r n _ T e x t _ T r u e T y p e ( B y V a l   x   A s   I n t e g e r ,   B y V a l   y   A s   I n t e g e r ,   _ 
 
             B y V a l   F S i z e   A s   I n t e g e r ,   B y V a l   F T y p e   A s   S t r i n g ,   B y V a l   F s p i n   A s   I n t e g e r ,   _ 
 
             B y V a l   F W e i g h t   A s   I n t e g e r ,   B y V a l   F I t a l i c   A s   I n t e g e r ,   B y V a l   F U n l i n e   A s   I n t e g e r ,   _ 
 
             B y V a l   F S t r i k e O u t   A s   I n t e g e r ,   B y V a l   i d _ n a m e   A s   S t r i n g ,   B y V a l   d a t a   A s   S t r i n g ,   _ 
 
             B y V a l   m e m _ m o d e   A s   I n t e g e r )   A s   I n t e g e r 
 
         D e c l a r e   F u n c t i o n   A _ P r n _ T e x t _ T r u e T y p e _ W ( B y V a l   x   A s   I n t e g e r ,   B y V a l   y   A s   I n t e g e r ,   _ 
 
             B y V a l   F H e i g h t   A s   I n t e g e r ,   B y V a l   F W i d t h   A s   I n t e g e r ,   B y V a l   F T y p e   A s   S t r i n g ,   _ 
 
             B y V a l   F s p i n   A s   I n t e g e r ,   B y V a l   F W e i g h t   A s   I n t e g e r ,   B y V a l   F I t a l i c   A s   I n t e g e r ,   _ 
 
             B y V a l   F U n l i n e   A s   I n t e g e r ,   B y V a l   F S t r i k e O u t   A s   I n t e g e r ,   B y V a l   i d _ n a m e   A s   S t r i n g ,   _ 
 
             B y V a l   d a t a   A s   S t r i n g ,   B y V a l   m e m _ m o d e   A s   I n t e g e r )   A s   I n t e g e r 
 
         D e c l a r e   F u n c t i o n   A _ P r n _ T e x t _ T r u e T y p e _ U n i ( B y V a l   x   A s   I n t e g e r ,   B y V a l   y   A s   I n t e g e r ,   _ 
 
             B y V a l   F S i z e   A s   I n t e g e r ,   B y V a l   F T y p e   A s   S t r i n g ,   B y V a l   F s p i n   A s   I n t e g e r ,   _ 
 
             B y V a l   F W e i g h t   A s   I n t e g e r ,   B y V a l   F I t a l i c   A s   I n t e g e r ,   B y V a l   F U n l i n e   A s   I n t e g e r ,   _ 
 
             B y V a l   F S t r i k e O u t   A s   I n t e g e r ,   B y V a l   i d _ n a m e   A s   S t r i n g ,   B y V a l   d a t a   A s   B y t e ( ) ,   _ 
 
             B y V a l   f o r m a t   A s   I n t e g e r ,   B y V a l   m e m _ m o d e   A s   I n t e g e r )   A s   I n t e g e r 
 
         D e c l a r e   F u n c t i o n   A _ P r n _ T e x t _ T r u e T y p e _ U n i B ( B y V a l   x   A s   I n t e g e r ,   B y V a l   y   A s   I n t e g e r ,   _ 
 
             B y V a l   F S i z e   A s   I n t e g e r ,   B y V a l   F T y p e   A s   S t r i n g ,   B y V a l   F s p i n   A s   I n t e g e r ,   _ 
 
             B y V a l   F W e i g h t   A s   I n t e g e r ,   B y V a l   F I t a l i c   A s   I n t e g e r ,   B y V a l   F U n l i n e   A s   I n t e g e r ,   _ 
 
             B y V a l   F S t r i k e O u t   A s   I n t e g e r ,   B y V a l   i d _ n a m e   A s   S t r i n g ,   B y V a l   d a t a   A s   B y t e ( ) ,   _ 
 
             B y V a l   f o r m a t   A s   I n t e g e r ,   B y V a l   m e m _ m o d e   A s   I n t e g e r )   A s   I n t e g e r 
 
 
 
 Sxe
 
         x ; 
 
             X   ^j0
 
         y ; 
 
             Y   ^j0
 
         F S i z e ; 
 
             T r u e T y p e   f o n t   s i z e UMOpޞ( d o t ) 0
 
         F H e i g h t ; 
 
             W[Wؚ^UMOpޞ( d o t ) 0
 
         F W i d t h ; 
 
             W[W[^UMOpޞ( d o t ) 0
 
         F T y p e ; 
 
             T r u e T y p e   f o n t   W[W
T1z0
 
         F s p i n ; 
 
             T r u e T y p e   f o n t   W[ԚeI01   - >   0 ,   2   - >   9 0 ,   3   - >   1 8 0 ,   4   - >   2 7 0 
 
         F W e i g h t ; 
 
             T r u e T y p e   f o n t   W[Ԛ|0}0
 
             0   a n d   N U L L   a n d   4 0 0   - >   4 0 0   jn0
 
             1 0 0   - >   ^8^0}02 0 0   - >   ui0}0
 
             3 0 0   - >   0}        05 0 0   - >   -NI{0
 
             6 0 0   - >   JS|    07 0 0   - >   |    0
 
             8 0 0   - >   yr|    09 0 0   - >   ўԚ0
 
         F I t a l i c ; 
 
             T r u e T y p e   f o n t   W[ԚeԚ00   - >   F A L S E 01   - >   T R U E 0
 
         F U n l i n e ; 
 
             T r u e T y p e   f o n t   W[ԚR^}00   - >   F A L S E 01   - >   T R U E 0
 
         F S t r i k e O u t ; 
 
             T r u e T y p e   f o n t   W[ԚR*Rd}00   - >   F A L S E 01   - >   T R U E 0
 
         i d _ n a m e ; 
 
             f}N NPX%R
T1zX[>eepSh_jgQN_vcO(uA _ L o a d _ G r a p h i c ( ) sSS\
W|TSQO0
 
         d a t a ; 
 
             eW[gQ[0
 
             A _ P r n _ T e x t _ T r u e T y p e _ U n i ( ) A _ P r n _ T e x t _ T r u e T y p e _ U n i B ( ) @b8eQvd a t a <h_pU T F - 8 0
 
             U T F - 1 6 bU n i c o d e   b i g   e n d i a n KNW[2NN p0 P}>\0
 
         f o r m a t ; 
 
             zl[U n i c o d e   d a t a v㉼xe_0
 
             0   - >   1uW[2N-vB O M ( B y t e   O r d e r   M a r k ) zl[. 
 
             1   - >   U T F - 1 6 . 
 
             2   - >   U n i c o d e   b i g   e n d i a n . 
 
             3   - >   U T F - 8 . 
 
         m e m _ m o d e ; 
 
             Wb_2QX[MOn  1   = >   R A M ,   2   = >   F l a s h   M e m o r y 
 
             la:   F l a s h 	gO(uX}TvP6R,   d^Wb_ǌe͑O(u,   &TGR^p\Wb_X[0RR A M 0
 
     
 
 PV<P
 
         0   - >   O K . 
 
         R e f e r e n c e   A W - E r r o r . t x t   f i l e . 
 
 
 
 {O
 
     V C : 
 
         c h a r   * v e r ,   * p b u f   =   n e w   c h a r [ 1 2 8 ] ; 
 
         A _ P r n _ T e x t _ T r u e T y p e ( 2 0 ,   6 0 ,   3 0 ,   " A r i a l " ,   1 ,   4 0 0 ,   0 ,   0 ,   0 ,   " A A " ,   
 
             " T r u e T y p e   F o n t " ,   1 ) ; / / s a v e   i n   r a m . 
 
         A _ P r n _ T e x t _ T r u e T y p e _ W ( 2 0 ,   9 0 ,   2 0 ,   2 0 ,   " T i m e s   N e w   R o m a n " ,   1 ,   4 0 0 ,   0 ,   0 ,   0 ,   " A B " , 
 
             " T T _ W :   YW[CQ,nf" ,   1 ) ; 
 
         A _ P r n _ T e x t _ T r u e T y p e _ U n i ( 2 0 ,   1 2 0 ,   3 0 ,   " T i m e s   N e w   R o m a n " ,   1 ,   4 0 0 ,   0 ,   0 ,   0 ,   " A C " , 
 
             L " T T _ U n i :   YW[CQ,nf" ,   1 ,   1 ) ; / / U T F - 1 6 
 
         s t r c p y ( p b u f ,   " \ x F F \ x F E " ) ; / / U T F - 1 6 . 
 
         m e m c p y ( & p b u f [ 2 ] ,   ( c h a r   * ) L " T T _ U n i B :   YW[CQ,nf" ,   1 5 * 2 ) ; / / c o p y   m u t i l   b y t e . 
 
         A _ P r n _ T e x t _ T r u e T y p e _ U n i B ( 2 0 ,   1 5 0 ,   3 0 ,   " T i m e s   N e w   R o m a n " ,   1 ,   4 0 0 ,   0 ,   0 ,   0 ,   " A D " , 
 
             p b u f ,   0 ,   1 ) ; / / B y t e   O r d e r   M a r k . 
 
     V B :   V B A : 
 
         D i m   b u f f 1 ( 1 2 8 )   A s   B y t e 
 
         D i m   b u f f 2 ( )   A s   B y t e 
 
         D i m   i   A s   I n t e g e r 
 
         C a l l   A _ P r n _ T e x t _ T r u e T y p e ( 2 0 ,   6 0 ,   3 0 ,   " A r i a l " ,   1 ,   4 0 0 ,   0 ,   0 ,   0 ,   " A A " ,   _ 
 
             " T r u e T y p e   F o n t " ,   1 )   ' s a v e   i n   r a m . 
 
         C a l l   A _ P r n _ T e x t _ T r u e T y p e _ W ( 2 0 ,   9 0 ,   2 0 ,   2 0 ,   " T i m e s   N e w   R o m a n " ,   1 ,   4 0 0 ,   0 ,   0 ,   0 ,   _ 
 
             " A B " ,   " T T _ W :   YW[CQ,nf" ,   1 ) 
 
         b u f f 2   =   S t r C o n v ( " T T _ U n i :   YW[CQ,nf" ,   v b N a r r o w )   
 
         ' C o n v e r t s   U N I C O D E ( w i d e   c h a r a c t e r s )   t o   s i n g l e - b y t e   c h a r a c t e r s . 
 
         F o r   i   =   L B o u n d ( b u f f 2 )   T o   U B o u n d ( b u f f 2 ) 
 
                 b u f f 1 ( i )   =   b u f f 2 ( i ) 
 
         N e x t   i 
 
         b u f f 1 ( 2 6 )   =   0   ' n u l l . 
 
         b u f f 1 ( 2 7 )   =   0 
 
         C a l l   A _ P r n _ T e x t _ T r u e T y p e _ U n i ( 2 0 ,   1 2 0 ,   3 0 ,   " T i m e s   N e w   R o m a n " ,   1 ,   4 0 0 ,   0 ,   0 ,   0 ,   _ 
 
             " A C " ,   b u f f 1 ( 0 ) ,   1 ,   1 )   ' U T F - 1 6 
 
         b u f f 1 ( 0 )   =   2 5 5   ' U T F - 1 6 . 
 
         b u f f 1 ( 1 )   =   2 5 4 
 
         b u f f 2   =   S t r C o n v ( " T T _ U n i B :   YW[CQ,nf" ,   v b N a r r o w )   
 
         ' C o n v e r t s   U N I C O D E ( w i d e   c h a r a c t e r s )   t o   s i n g l e - b y t e   c h a r a c t e r s . 
 
         F o r   i   =   L B o u n d ( b u f f 2 )   T o   U B o u n d ( b u f f 2 ) 
 
                 b u f f 1 ( i   +   2 )   =   b u f f 2 ( i ) 
 
         N e x t   i 
 
         b u f f 1 ( 3 0 )   =   0   ' n u l l . 
 
         b u f f 1 ( 3 1 )   =   0 
 
         C a l l   A _ P r n _ T e x t _ T r u e T y p e _ U n i B ( 2 0 ,   1 5 0 ,   3 0 ,   " T i m e s   N e w   R o m a n " ,   1 ,   4 0 0 ,   0 ,   0 ,   0 ,   _ 
 
             " A D " ,   b u f f 1 ( 0 ) ,   0 ,   1 )   ' B y t e   O r d e r   M a r k . 
 
     V B . n e t : 
 
         D i m   p b u f ( 1 2 8 )   A s   B y t e 
 
         D i m   e n c U n i c o d e   =   S y s t e m . T e x t . E n c o d i n g . U n i c o d e 
 
         C a l l   A _ P r n _ T e x t _ T r u e T y p e ( 2 0 ,   6 0 ,   3 0 ,   " A r i a l " ,   1 ,   4 0 0 ,   0 ,   0 ,   0 ,   " A A " ,   _ 
 
             " T r u e T y p e   F o n t " ,   1 )   ' s a v e   i n   r a m . 
 
         C a l l   A _ P r n _ T e x t _ T r u e T y p e _ W ( 2 0 ,   9 0 ,   2 0 ,   2 0 ,   " T i m e s   N e w   R o m a n " ,   1 ,   4 0 0 ,   0 ,   0 ,   0 ,   _ 
 
             " A B " ,   " T T _ W :   YW[CQ,nf" ,   1 ) 
 
         C a l l   A _ P r n _ T e x t _ T r u e T y p e _ U n i ( 2 0 ,   1 2 0 ,   3 0 ,   " T i m e s   N e w   R o m a n " ,   1 ,   4 0 0 ,   0 ,   0 ,   0 ,   _ 
 
             " A C " ,   e n c U n i c o d e . G e t B y t e s ( " T T _ U n i :   YW[CQ,nf" ) ,   1 ,   1 )   ' U T F - 1 6 
 
         p b u f ( 0 )   =   2 5 5   ' U T F - 1 6 . 
 
         p b u f ( 1 )   =   2 5 4 
 
         e n c U n i c o d e . G e t B y t e s ( " T T _ U n i B :   YW[CQ,nf" ,   0 ,   1 4 ,   p b u f ,   2 )   ' c o p y   m u t i l   b y t e . 
 
         p b u f ( 3 0 )   =   0   ' n u l l . 
 
         p b u f ( 3 1 )   =   0 
 
         C a l l   A _ P r n _ T e x t _ T r u e T y p e _ U n i B ( 2 0 ,   1 5 0 ,   3 0 ,   " T i m e s   N e w   R o m a n " ,   1 ,   4 0 0 ,   0 ,   0 ,   0 ,   _ 
 
             " A D " ,   p b u f ,   0 ,   1 )   ' B y t e   O r d e r   M a r k . 
 
 
 
 f    P  A _ P r n _ T e x t _ T r u e T y p e ( )   QxeSNpSQ NL  T r u e   T y p e   F o n t   eW[0
 
 
 
 * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * 
 
 A _ S e t _ B a c k f e e d ( ) 
 
 = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = 
 
 R    jd|V6e\PbkMOn0
 
 
 
 l
 
     V C : 
 
         i n t   A _ S e t _ B a c k f e e d ( i n t   b a c k ) ; 
 
     V B :   V B A : 
 
         D e c l a r e   F u n c t i o n   A _ S e t _ B a c k f e e d ( B y V a l   b a c k   A s   L o n g )   A s   L o n g 
 
     V B . n e t : 
 
         D e c l a r e   F u n c t i o n   A _ S e t _ B a c k f e e d ( B y V a l   b a c k   A s   I n t e g e r )   A s   I n t e g e r 
 
 
 
 Sxe
 
         b a c k ; 
 
             \PbkMOn{
W2 2 0 ^9 9 9 0pSh_jgQ[2 2 0 0
 
             la1   =   0 . 0 1   T. 
 
 
 
 PV<P
 
         0   - >   O K . 
 
         R e f e r e n c e   A W - E r r o r . t x t   f i l e . 
 
 
 
 {O
 
     V C : 
 
         A _ S e t _ B a c k f e e d ( 3 2 0 ) ; 
 
     V B :   V B A :   V B . n e t : 
 
         C a l l   A _ S e t _ B a c k f e e d ( 3 2 0 ) 
 
 
 
 f    P  A _ S e t _ B a c k f e e d   QxeSNORpS[_T N\kjd|}}YO(u[
 
         pSQbgS[fdjd|06q_[g(WpSN N5_Bf V0RivuޞQpSN N
 
         5_vu N!kpSxe5_BfS	g(W,{ N5_Mbg__V.~0
 
 
 
 * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * 
 
 A _ S e t _ B M P S a v e ( ) 
 
 = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = 
 
 R    2QX[q_PWj0
 
 
 
 l
 
     V C : 
 
         i n t   A _ S e t _ B M P S a v e ( i n t   n S a v e ,   c h a r   * p s t r B M P F N a m e ) ; 
 
     V B :   V B A : 
 
         D e c l a r e   F u n c t i o n   A _ S e t _ B M P S a v e ( B y V a l   n S a v e   A s   L o n g ,   _ 
 
             B y V a l   p s t r B M P F N a m e   A s   S t r i n g )   A s   L o n g 
 
     V B . n e t : 
 
         D e c l a r e   F u n c t i o n   A _ S e t _ B M P S a v e ( B y V a l   n S a v e   A s   I n t e g e r ,   _ 
 
             B y V a l   p s t r B M P F N a m e   A s   S t r i n g )   A s   I n t e g e r 
 
 
 
 Sxe
 
         n S a v e ; 
 
             1   - >   2QX[Wj,   0   - >   
N2QX[Wj
 
         p s t r B M P F N a m e ; 
 
             2QX[Wjv
T1z. 
 
 
 
 PV<P
 
         0   - >   O K . 
 
         R e f e r e n c e   A W - E r r o r . t x t   f i l e . 
 
 
 
 {O
 
     V C : 
 
         A _ S e t _ B M P S a v e ( 1 ,   " C : \ \ T e m p B M P . b m p " ) ; 
 
     V B :   V B A :   V B . n e t : 
 
         C a l l   A _ S e t _ B M P S a v e ( 1 ,   " C : \ \ T e m p B M P . b m p " ) 
 
 
 
 f    P  A _ S e t _ B M P S a v e   QxeSNzl[/f&T2QX[q_PWj0
 
 
 
 * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * 
 
 A _ S e t _ C u t t i n g ( ) 
 
 = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = 
 
 R    -[c[pSQ~^5__R RR N!k0
 
 
 
 l
 
     V C : 
 
         i n t   A _ S e t _ C u t t i n g ( i n t   c u t t i n g ) ; 
 
     V B :   V B A : 
 
         D e c l a r e   F u n c t i o n   A _ S e t _ C u t t i n g ( B y V a l   c u t t i n g   A s   L o n g )   A s   L o n g 
 
     V B . n e t : 
 
         D e c l a r e   F u n c t i o n   A _ S e t _ C u t t i n g ( B y V a l   c u t t i n g   A s   I n t e g e r )   A s   I n t e g e r 
 
 
 
 Sxe
 
         c u t t i n g ; 
 
             c[pSQ~^5__R RR N!k{
W0 ^9 9 9 9 0
 
 
 
 PV<P
 
         0   - >   O K . 
 
         R e f e r e n c e   A W - E r r o r . t x t   f i l e . 
 
 
 
 {O
 
     V C : 
 
         A _ S e t _ C u t t i n g ( 1 2 ) ; 
 
     V B :   V B A :   V B . n e t : 
 
         C a l l   A _ S e t _ C u t t i n g ( 1 2 ) 
 
 
 
 f    P  A _ S e t _ C u t t i n g   QxeS	gvuR R	eQ( _URR R) BfMbgR\O0c[R R(WpSQ~^5__
 
         R N!kpSQZԚ0
 
 
 
 * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * 
 
 A _ S e t _ D a r k n e s s ( ) 
 
 = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = 
 
 R    -[qa-RpSq^0
 
 
 
 l
 
     V C : 
 
         i n t   A _ S e t _ D a r k n e s s ( i n t   h e a t ) ; 
 
     V B :   V B A : 
 
         D e c l a r e   F u n c t i o n   A _ S e t _ D a r k n e s s ( B y V a l   d a r k n e s s   A s   L o n g )   A s   L o n g 
 
     V B . n e t : 
 
         D e c l a r e   F u n c t i o n   A _ S e t _ D a r k n e s s ( B y V a l   d a r k n e s s   A s   I n t e g e r )   A s   I n t e g e r 
 
 
 
 Sxe
 
         h e a t ; 
 
             -[qa-RpSq^{
W0 ^2 0 0-<P1 0 . 
 
 
 
 PV<P
 
         0   - >   O K . 
 
         R e f e r e n c e   A W - E r r o r . t x t   f i l e . 
 
 
 
 {O
 
     V C : 
 
         A _ S e t _ D a r k n e s s ( 1 2 ) ; 
 
     V B :   V B A :   V B . n e t : 
 
         C a l l   A _ S e t _ D a r k n e s s ( 1 2 ) 
 
 
 
 f    P  A _ S e t _ D a r k n e s s   Qxec6Rq_Pom`_0Rf}YvpSQT`Oarna
 
          NNV }P  p a p e r   m e d i a 0r i b b o n   t y p e s ( w a x , s e m i - r e s i n   T  r e s i n )   T
 
         i m a g e   p a t t e r n   i t s e l f 0
 
 
 
 * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * 
 
 A _ S e t _ D e b u g D i a l o g ( ) 
 
 = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = 
 
 R    -[d/tX0
 
 
 
 l
 
     V C : 
 
         i n t   A _ S e t _ D e b u g D i a l o g ( i n t   n E n a b l e ) ; 
 
     V B :   V B A : 
 
         D e c l a r e   F u n c t i o n   A _ S e t _ D e b u g D i a l o g ( B y V a l   n E n a b l e   A s   L o n g )   A s   L o n g 
 
     V B : 
 
         D e c l a r e   F u n c t i o n   A _ S e t _ D e b u g D i a l o g ( B y V a l   n E n a b l e   A s   I n t e g e r )   A s   I n t e g e r 
 
 
 
 Sxe
 
         n E n a b l e ; 
 
             1   - >   d/tX,   0   - >   d/tXܕ. 
 
 
 
 PV<P
 
         0   - >   O K . 
 
         R e f e r e n c e   A W - E r r o r . t x t   f i l e . 
 
 
 
 {O
 
     V C : 
 
         A _ S e t _ D e b u g D i a l o g ( 1 ) ; 
 
     V B :   V B A :   V B . n e t : 
 
         C a l l   A _ S e t _ D e b u g D i a l o g ( 1 ) 
 
 
 
 f    P  A _ S e t _ D e b u g D i a l o g   Qxe-[d/tXdNgVP/x_NgyQf
 
         :y
o`
\qFhY0
 
 
 
 * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * 
 
 A _ S e t _ F e e d ( ) 
 
 = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = 
 
 R    -[jd|}Qv^0
 
 
 
 l
 
     V C : 
 
         i n t   A _ S e t _ F e e d ( c h a r   r a t e ) ; 
 
     V B :   V B A : 
 
         D e c l a r e   F u n c t i o n   A _ S e t _ F e e d ( B y V a l   r a t e   A s   B y t e )   A s   L o n g 
 
     V B . n e t : 
 
         D e c l a r e   F u n c t i o n   A _ S e t _ F e e d ( B y V a l   r a t e   A s   B y t e )   A s   I n t e g e r 
 
 
 
 Sxe
 
         r a t e ; 
 
             [jd|}Qv^YNh( A ^K ) 
 
             + - - - + - - - - - - - + - - - + - - - - - - - + - - - + - - - - - - - + - - - + - - - - - - - + - - - + - - - - - - - + - - - + - - - - - - - + 
 
             |   A   | 1 . 0   i p s |   B   | 1 . 5   i p s |   C   | 2 . 0   i p s |   D   | 2 . 5   i p s |   E   | 3 . 0   i p s |   F   | 3 . 5   i p s | 
 
             + - - - + - - - - - - - + - - - + - - - - - - - + - - - + - - - - - - - + - - - + - - - - - - - + - - - + - - - - - - - + - - - + - - - - - - - + 
 
             |   G   | 4 . 0   i p s |   H   | 4 . 5   i p s |   I   | 5 . 0   i p s |   J   | 5 . 5   i p s |   K   | 6 . 0   i p s |       |               | 
 
             + - - - + - - - - - - - + - - - + - - - - - - - + - - - + - - - - - - - + - - - + - - - - - - - + - - - + - - - - - - - + - - - + - - - - - - - + 
 
             + - - - - - - - - - - + - - - - - - - - - - - + 
 
             |     P r i n t e r   | S p e e d   R a n g e | 
 
             + - - - - - - - - - - + - - - - - - - - - - - + 
 
             | O S - 2 1 4 / 2 0 4 |         A ~ E         | 
 
             + - - - - - - - - - - + - - - - - - - - - - - + 
 
             |     O S - 3 1 4     |         A ~ C         | 
 
             + - - - - - - - - - - + - - - - - - - - - - - + 
 
             |     X - 1 0 0 0     |         A ~ G         | 
 
             + - - - - - - - - - - + - - - - - - - - - - - + 
 
             |     X - 2 0 0 0     |         A ~ I         | 
 
             + - - - - - - - - - - + - - - - - - - - - - - + 
 
             |     X - 3 0 0 0     |         A ~ K         | 
 
             + - - - - - - - - - - + - - - - - - - - - - - + 
 
 
 
 PV<P
 
         0   - >   O K . 
 
         R e f e r e n c e   A W - E r r o r . t x t   f i l e . 
 
 
 
 {O
 
     V C : 
 
         A _ S e t _ F e e d ( ' E ' ) ; 
 
     V B :   V B A :   V B . n e t : 
 
         C a l l   A _ S e t _ F e e d ( A s c ( " E " ) ) 
 
 
 
 f    P  A _ S e t _ F e e d   Qxe-[jd|}Qv^0k!kvu`O	cN  F E E D   	cubdk
 
         QxeBfpSh_jT\gOdk-[<Pv^KI0
 
 
 
 * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * 
 
 A _ S e t _ F o r m ( ) 
 
 = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = 
 
 R    2QX[&NRpS  F O R M   ( h<h) 0
 
 
 
 l
 
     V C : 
 
         i n t   A _ S e t _ F o r m ( L P C T S T R   f o r m f i l e ,   L P C T S T R   f o r m _ n a m e ,   i n t   m e m _ m o d e ) ; 
 
     V B :   V B A : 
 
         D e c l a r e   F u n c t i o n   A _ S e t _ F o r m ( B y V a l   f o r m f i l e   A s   S t r i n g ,   B y V a l   f o r m _ n a m e   A s   S t r i n g ,   _ 
 
             B y V a l   m e m _ m o d e   A s   L o n g )   A s   L o n g 
 
     V B . n e t : 
 
         D e c l a r e   F u n c t i o n   A _ S e t _ F o r m ( B y V a l   f o r m f i l e   A s   S t r i n g ,   B y V a l   f o r m _ n a m e   A s   S t r i n g ,   _ 
 
             B y V a l   m e m _ m o d e   A s   I n t e g e r )   A s   I n t e g e r 
 
 
 
 Sxe
 
         f o r m f i l e ; 
 
             h<hjHh_0
 
         f o r m _ n a m e ; 
 
             h<h
T1z(uOX[(WpSh_jgQF o r m   vj:y
T1zvu  P r i n t _ F o r m ( )   @b8eQvh<h
T1z0
 
         m e m _ m o d e ; 
 
             aԚ!j_1   = >   R A M ,   2   = >   F l a s h   M e m o r y 
 
             la: F l a s h 	gO(uX}T, 8^O(ug bX}Tnw, Y^_ˊQϑX[0RR A M . 
 
 
 
 PV<P
 
         0   - >   O K . 
 
         R e f e r e n c e   A W - E r r o r . t x t   f i l e . 
 
 
 
 {O
 
     V C : 
 
         A _ S e t _ F o r m ( " d e m o . p r n " ,   " d e m o " ,   1 ) ; 
 
     V B :   V B A :   V B . n e t : 
 
         C a l l   A _ S e t _ F o r m ( " d e m o . p r n " ,   " d e m o " ,   1 ) 
 
 
 
 f    P  A _ S e t _ F o r m   Qxe2QX[&NRpS  F O R M   ( h<h) 0(WO(uPQxeBfHQ(W
 
         A _ P r i n t _ F o r m QxeKNMR0O(udkQxeBf1\_WL  P r i n t _ F o r m ( ) 0
 
 
 
 * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * 
 
 A _ S e t _ M a r g i n ( ) 
 
 = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = 
 
 R    -[YRpSMOnT]zz}vzz0
 
 
 
 l
 
     V C : 
 
         i n t   A _ S e t _ M a r g i n ( i n t   p o s i t i o n ,   i n t   m a r g i n ) ; 
 
     V B :   V B A : 
 
         D e c l a r e   F u n c t i o n   A _ S e t _ M a r g i n ( B y V a l   p o s i t i o n   A s   L o n g ,   _ 
 
             B y V a l   m a r g i n   A s   L o n g )   A s   L o n g 
 
     V B . n e t : 
 
         D e c l a r e   F u n c t i o n   A _ S e t _ M a r g i n ( B y V a l   p o s i t i o n   A s   I n t e g e r ,   _ 
 
             B y V a l   m a r g i n   A s   I n t e g e r )   A s   I n t e g e r 
 
 
 
 Sxe
 
         p o s i t i o n ; 
 
             -[YMOn{
W0 ^9 9 9 9 0
 
             <h_:   \  2 2 0   vR0( 1 0 0   =   1 T) 
 
         m a r g i n ; 
 
             -[]zz}vzz{
W0 ^9 9 9 9 0( 1 0 0   =   1 T) 
 
 
 
 PV<P
 
         0   - >   O K . 
 
         R e f e r e n c e   A W - E r r o r . t x t   f i l e . 
 
 
 
 {O
 
     V C : 
 
         A _ S e t _ M a r g i n ( 1 0 0 ,   1 0 0 ) ; 
 
     V B :   V B A :   V B . n e t : 
 
         C a l l   A _ S e t _ M a r g i n ( 1 0 0 ,   1 0 0 ) 
 
 
 
 f    P  A _ S e t _ M a r g i n   Qxe-[YRpSMOnT]zz}vzz0  p o s i t i o n   Sxe
 
         (WpSh_j-<P/f  2 2 0 vu8eQxe<PBfQxe\R  2 2 0   vRpP}geQpS
 
         h_j0Yg`OO(udkQxe_tePHrbWeg4ls^MOyb]SyRpSQ0
 
 
 
 * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * 
 
 A _ S e t _ P r n c o m p o r t ( ) 
 
 = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = 
 
 R    -[pSh_j^RW0
 
 
 
 l
 
     V C : 
 
         i n t   A _ S e t _ P r n c o m p o r t ( i n t   b a u d ,   i n t   p a r i t y ,   i n t   d a t a ,   i n t   s t o p ) ; 
 
     V B :   V B A : 
 
         D e c l a r e   F u n c t i o n   A _ S e t _ P r n c o m p o r t ( B y V a l   b a u d   A s   L o n g ,   B y V a l   p a r i t y   A s   L o n g ,   _ 
 
             B y V a l   d a t a   A s   L o n g ,   B y V a l   s s t o p   A s   L o n g )   A s   L o n g 
 
     V B . n e t : 
 
         D e c l a r e   F u n c t i o n   A _ S e t _ P r n c o m p o r t ( B y V a l   b a u d   A s   I n t e g e r ,   B y V a l   p a r i t y   A s   I n t e g e r ,   _ 
 
             B y V a l   d a t a   A s   I n t e g e r ,   B y V a l   s s t o p   A s   I n t e g e r )   A s   I n t e g e r 
 
 
 
 Sxe
 
         b a u d ; 
 
             >rsYNh
 
             0   - >   9 6 0 0 ,   1   - >   6 0 0 
 
             2   - >   2 4 0 0 ,   3   - >   1 9 2 0 0 
 
             4   - >   4 8 0 0 ,   5   - >   3 8 4 0 0 
 
             6   - >   1 2 0 0 ,   7   - >   9 6 0 0 
 
             8   - >   5 7 6 0 0 ,   9   - >   1 1 5 2 0 0 
 
         p a r i t y ; 
 
             P a r i t y YNh
 
             0   - >   n o n e   p a r i t y 
 
             1   - >   e v e n   p a r i t y 
 
             2   - >   o d d     p a r i t y 
 
         d a t a ; 
 
             D a t a   b i t   n u m b e r : 
 
             7   - >   7 - b i t   d a t a 
 
             8   - >   8 - b i t   d a t a 
 
         s t o p ; 
 
             S t o p   b i t   n u m b e r : 
 
             1   - >   1   s t o p   b i t 
 
             2   - >   2   s t o p   b i t s 
 
 
 
 PV<P
 
         0   - >   O K . 
 
         R e f e r e n c e   A W - E r r o r . t x t   f i l e . 
 
 
 
 {O
 
     V C : 
 
         A _ S e t _ P r n c o m p o r t ( 0 ,   0 ,   8 ,   1 ) ; 
 
     V B :   V B A :   V B . n e t : 
 
         C a l l   A _ S e t _ P r n c o m p o r t ( 0 ,   0 ,   8 ,   1 ) 
 
 
 
 f    P  A _ S e t _ P r n c o m p o r t   Qxeg-[pSh_j^RW-[<PO9epSh_jvTe
 
         P C   ^RW-[<PYg
NTGR!ql  P C   #c0dkQxe_(WQxe  P r i n t _ O u t 
 
         KNMRWL_UhsWL0
 
 
 
 * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * 
 
 A _ S e t _ P r n c o m p o r t _ P C ( ) 
 
 = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = 
 
 R    -[  P C   ^RW0
 
 
 
 l
 
     V C : 
 
         i n t   A _ S e t _ P r n c o m p o r t _ P C ( i n t   n B a u d R a t e ,   i n t   n B y t e S i z e ,   i n t   n P a r i t y ,   i n t   n S t o p B i t s , 
 
             i n t   n D s r ,   i n t   n C t s ,   i n t   n X o n X o f f ) ; 
 
     V B :   V B A : 
 
         D e c l a r e   F u n c t i o n   A _ S e t _ P r n c o m p o r t _ P C ( B y V a l   n B a u d R a t e   A s   L o n g ,   _ 
 
             B y V a l   n B y t e S i z e   A s   L o n g ,   B y V a l   n P a r i t y   A s   L o n g ,   B y V a l   n S t o p B i t s   A s   L o n g ,   _ 
 
             B y V a l   n D s r   A s   L o n g ,   B y V a l   n C t s   A s   L o n g ,   B y V a l   n X o n X o f f   A s   L o n g )   A s   L o n g 
 
     V B . n e t : 
 
         D e c l a r e   F u n c t i o n   A _ S e t _ P r n c o m p o r t _ P C ( B y V a l   n B a u d R a t e   A s   I n t e g e r ,   _ 
 
             B y V a l   n B y t e S i z e   A s   I n t e g e r ,   B y V a l   n P a r i t y   A s   I n t e g e r ,   B y V a l   n S t o p B i t s   A s   I n t e g e r ,   _ 
 
             B y V a l   n D s r   A s   I n t e g e r ,   B y V a l   n C t s   A s   I n t e g e r ,   B y V a l   n X o n X o f f   A s   I n t e g e r )   A s   I n t e g e r 
 
 
 
 Sxe
 
         n B a u d R a t e ; 
 
             >rsYNh
 
             1   - >   1 1 0           9   - >   1 9 2 0 0 
 
             2   - >   3 0 0         1 0   - >   3 8 4 0 0 
 
             3   - >   6 0 0         1 1   - >   5 6 0 0 0 
 
             4   - >   1 2 0 0       1 2   - >   5 7 6 0 0 
 
             5   - >   2 4 0 0       1 3   - >   1 1 5 2 0 0 
 
             6   - >   4 8 0 0       1 4   - >   1 2 8 0 0 0 
 
             7   - >   9 6 0 0       1 5   - >   2 5 6 0 0 0 
 
             8   - >   1 4 4 0 0       0   - >   9 6 0 0 
 
         n B y t e S i z e ; 
 
             D a t a   b i t   n u m b e r : 
 
             0   - >   8 - b i t   d a t a 
 
             7   - >   7 - b i t   d a t a 
 
             8   - >   8 - b i t   d a t a 
 
         n P a r i t y ; 
 
             P a r i t y YNh
 
             0   - >   n o n e   p a r i t y 
 
             1   - >   e v e n   p a r i t y 
 
             2   - >   o d d     p a r i t y 
 
         n S t o p B i t s ; 
 
             S t o p   b i t   n u m b e r : 
 
             0   - >   1   s t o p   b i t 
 
             1   - >   1   s t o p   b i t 
 
             2   - >   2   s t o p   b i t s 
 
         n D s r ; 
 
             S e t u p   h a r d w a r e   f l o w   c o n t r o l 
 
             1   - >   D T R   C O N T R O L   H A N D S H A K E ; 
 
             0   - >   D T R   C O N T R O L   E N A B L E ; 
 
         n C t s ; 
 
             S e t u p   h a r d w a r e   f l o w   c o n t r o l 
 
             1   - >   R T S   C O N T R O L   H A N D S H A K E ; 
 
             0   - >   R T S   C O N T R O L   E N A B L E ; 
 
         n X o n X o f f ; 
 
             S e t u p   s o f t w a r e   f l o w   c o n t r o l 
 
             0   - >   E n a b l e ; 
 
             1   - >   D i s a b l e ; 
 
 
 
 PV<P
 
         0   - >   O K . 
 
         R e f e r e n c e   A W - E r r o r . t x t   f i l e . 
 
 
 
 {O
 
     V C : 
 
         A _ S e t _ P r n c o m p o r t _ P C ( 0 ,   0 ,   0 ,   0 ,   0 ,   0 ,   0 ) ; 
 
     V B :   V B A :   V B . n e t : 
 
         C a l l   A _ S e t _ P r n c o m p o r t _ P C ( 0 ,   0 ,   0 ,   0 ,   0 ,   0 ,   0 ) 
 
 
 
 f    P  A _ S e t _ P r n c o m p o r t _ P C   Qxeg-[  P C   ^RW-[<PO9e  P C   vTepS
 
         h_j^RW-[<PYg
NTGR!qlpSh_j#c0dkQxe_(WQxe
 
         A _ P r i n t _ O u t   KNMRWL0
 
 
 
 * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * 
 
 A _ S e t _ S e n s o r _ M o d e ( ) 
 
 = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = 
 
 R    -[  S E N S O R   !j_b#~}!j_0
 
 
 
 l
 
     V C : 
 
         i n t   A _ S e t _ S e n s o r _ M o d e ( c h a r   t y p e ,   i n t   c o n t i n u o u s ) ; 
 
     V B :   V B A : 
 
         D e c l a r e   F u n c t i o n   A _ S e t _ S e n s o r _ M o d e ( B y V a l   t t y p e   A s   B y t e ,   _ 
 
             B y V a l   c o n t i n u o u s   A s   L o n g )   A s   L o n g 
 
     V B . n e t : 
 
         D e c l a r e   F u n c t i o n   A _ S e t _ S e n s o r _ M o d e ( B y V a l   t t y p e   A s   B y t e ,   _ 
 
             B y V a l   c o n t i n u o u s   A s   I n t e g e r )   A s   I n t e g e r 
 
 
 
 Sxe
 
         t y p e ; 
 
         c o n t i n u o u s ; 
 
             + - - - - + - - - - - - - - - - - + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + 
 
             | T Y P E | c o n t i n u o u s   | R E M A R K                                                       | 
 
             + - - - - + - - - - - - - - - - - + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + 
 
             |   e     |     0                 | S e l e c t   e d g e   s e n s o r   ( D e f a u l t )           | 
 
             + - - - - + - - - - - - - - - - - + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + 
 
             |   r     |     0                 | S e l e c t   r e f l e c t i v e   s e n s o r   f o r   g a p   | 
 
             + - - - - + - - - - - - - - - - - + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + 
 
             |   c     | 0 ~ 9 9 9 9   i n c h | S e t   c o n t i n u o u s   p a p e r   t y p e                 | 
 
             + - - - - + - - - - - - - - - - - + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + 
 
             ( 1 0 0   =   1   T) 
 
 
 
 PV<P
 
         0   - >   O K . 
 
         R e f e r e n c e   A W - E r r o r . t x t   f i l e . 
 
 
 
 {O
 
     V C : 
 
         A _ S e t _ S e n s o r _ M o d e ( ' c ' , 3 0 0 ) ; 
 
     V B :   V B A :   V B . n e t : 
 
         C a l l   A _ S e t _ S e n s o r _ M o d e ( A s c ( " c " ) , 3 0 0 ) 
 
 
 
 f    P  A _ S e t _ S e n s o r _ M o d e   Qxe-[p  " e "   BfGR  s e n s o r   Nzjd|ZԚe_ObS  g a p 0
 
         -[p  " r "   BfGR  s e n s o r   NS\jd|ZԚe_ObS  g a p 0
 
         vu/f#~!j_' c ' BfpSh_jg_eu  g a p   S  m a r k O  p a p e r   s e n s o r   
NR\O0
 
 
 
 * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * 
 
 A _ S e t _ S p e e d ( ) 
 
 = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = 
 
 R    -[RpS^0
 
 
 
 l
 
     V C : 
 
         i n t   A _ S e t _ S p e e d ( c h a r   s p e e d ) ; 
 
     V B :   V B A : 
 
         D e c l a r e   F u n c t i o n   A _ S e t _ S p e e d ( B y V a l   s p e e d   A s   B y t e )   A s   L o n g 
 
     V B . n e t : 
 
         D e c l a r e   F u n c t i o n   A _ S e t _ S p e e d ( B y V a l   s p e e d   A s   B y t e )   A s   I n t e g e r 
 
 
 
 Sxe
 
         s p e e d ; 
 
             -[RpS^YNh( A ^K ) 
 
             + - - - + - - - - - - - + - - - + - - - - - - - + - - - + - - - - - - - + - - - + - - - - - - - + - - - + - - - - - - - + - - - + - - - - - - - + 
 
             |   A   | 1 . 0   i p s |   B   | 1 . 5   i p s |   C   | 2 . 0   i p s |   D   | 2 . 5   i p s |   E   | 3 . 0   i p s |   F   | 3 . 5   i p s | 
 
             + - - - + - - - - - - - + - - - + - - - - - - - + - - - + - - - - - - - + - - - + - - - - - - - + - - - + - - - - - - - + - - - + - - - - - - - + 
 
             |   G   | 4 . 0   i p s |   H   | 4 . 5   i p s |   I   | 5 . 0   i p s |   J   | 5 . 5   i p s |   K   | 6 . 0   i p s |   L   | 7 . 0   i p s | 
 
             + - - - + - - - - - - - + - - - + - - - - - - - + - - - + - - - - - - - + - - - + - - - - - - - + - - - + - - - - - - - + - - - + - - - - - - - + 
 
             + - - - - - - - - - - + - - - - - - - - - - - + 
 
             |     P r i n t e r   | S p e e d   R a n g e | 
 
             + - - - - - - - - - - + - - - - - - - - - - - + 
 
             | O S - 2 1 4 / 2 0 4 |         A ~ E         | 
 
             + - - - - - - - - - - + - - - - - - - - - - - + 
 
             |     O S - 3 1 4     |         A ~ C         | 
 
             + - - - - - - - - - - + - - - - - - - - - - - + 
 
             |     X - 1 0 0 0     |         A ~ G         | 
 
             + - - - - - - - - - - + - - - - - - - - - - - + 
 
             |     X - 2 0 0 0     |         A ~ I         | 
 
             + - - - - - - - - - - + - - - - - - - - - - - + 
 
             |     X - 3 0 0 0     |         A ~ L         | 
 
             + - - - - - - - - - - + - - - - - - - - - - - + 
 
 
 
 PV<P
 
         0   - >   O K . 
 
         R e f e r e n c e   A W - E r r o r . t x t   f i l e . 
 
 
 
 {O
 
     V C : 
 
         A _ S e t _ S p e e d ( ' E ' ) ; 
 
     V B :   V B A :   V B . n e t : 
 
         C a l l   A _ S e t _ S p e e d ( A s c ( " E " ) ) 
 
 
 
 f    P  A _ S e t _ S p e e d   Qxepc6RRpS^0
 
 
 
 * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * 
 
 A _ S e t _ S y s s e t t i n g ( ) 
 
 = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = 
 
 R    -[IpS!j_0_UR  C u t t e r   b  P e e l 0-[jd| gwvw^09e  s l a s h   z e r o 
 
         p  n o r m a l   z e r o 0-[kpS N5_f\P N!k0
 
 
 
 l
 
     V C : 
 
         i n t   A _ S e t _ S y s s e t t i n g ( i n t   t r a n s f e r ,   i n t   c u t _ p e e l ,   i n t   l e n g t h ,   i n t   z e r o ,   i n t   p a u s e ) ; 
 
     V B :   V B A : 
 
         D e c l a r e   F u n c t i o n   A _ S e t _ S y s s e t t i n g ( B y V a l   t r a n s f e r   A s   L o n g ,   B y V a l   c u t _ p e e l   A s   L o n g ,   _ 
 
             B y V a l   L e n g t h   A s   L o n g ,   B y V a l   z e r o   A s   L o n g ,   B y V a l   p a u s e   A s   L o n g )   A s   L o n g 
 
     V B . n e t : 
 
         D e c l a r e   F u n c t i o n   A _ S e t _ S y s s e t t i n g ( B y V a l   t r a n s f e r   A s   I n t e g e r ,   _ 
 
             B y V a l   c u t _ p e e l   A s   I n t e g e r ,   B y V a l   L e n g t h   A s   I n t e g e r ,   B y V a l   z e r o   A s   I n t e g e r ,   _ 
 
             B y V a l   p a u s e   A s   I n t e g e r )   A s   I n t e g e r 
 
 
 
 Sxe
 
         t r a n s f e r ; 
 
             -[IpS!j_YNh
 
             + - - - - - - - - - - + - - - - - - - - - - - - - - - - - - + 
 
             |   t r a n s f e r   |   IpS!j_                  | 
 
             + - - - - - - - - - - + - - - - - - - - - - - - - - - - - - + 
 
             |         0           |   
NR\O                      | 
 
             + - - - - - - - - - - + - - - - - - - - - - - - - - - - - - + 
 
             |         1           |   qa                          | 
 
             + - - - - - - - - - - + - - - - - - - - - - - - - - - - - - + 
 
             |         2           |   qI                          | 
 
             + - - - - - - - - - - + - - - - - - - - - - - - - - - - - - +             
 
         c u t _ p e e l ; 
 
             _UR  C u t t e r   b  P e e l YNh
 
             + - - - - - - - - - - + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + 
 
             |   c u t _ p e e l   |   1!j_                                        | 
 
             + - - - - - - - - - - + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + 
 
             |         9           |   
NR\O                                            | 
 
             + - - - - - - - - - - + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + 
 
             |         0           |   l	g  C u t t e r   T  P e e l                   | 
 
             + - - - - - - - - - - + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + 
 
             |         1           |   _UR  C u t t e r                                   | 
 
             + - - - - - - - - - - + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + 
 
             |         4           |   _UR  P e e l                                       | 
 
             + - - - - - - - - - - + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +                         
 
         l e n g t h ; 
 
             -[jd| gwvw^{
W1 ^1 2 0 0 0
 
             vu`O-p  0   BfGR
NR\O0( 1 0 0   =   1   T) 
 
         z e r o ; 
 
             9e  s l a s h   z e r o   p  n o r m a l   z e r o 0
 
             ' 0 ' GR
NR\O0
 
             ' 1 ' 9ep  n o r m a l   z e r o 0
 
         p a u s e ; 
 
             -[kpS N5_f\P N!kYNh
 
             + - - - - - - - + - - - - - - - - - - - - - + 
 
             |   p a u s e   |   R                | 
 
             + - - - - - - - + - - - - - - - - - - - - - + 
 
             |       0       |   
NR\O            | 
 
             + - - - - - - - + - - - - - - - - - - - - - + 
 
             |       1       |   -[f\P        | 
 
             + - - - - - - - + - - - - - - - - - - - - - + 
 
             |       2       |   Smf\P        | 
 
             + - - - - - - - + - - - - - - - - - - - - - +                         
 
 
 
 PV<P
 
         0   - >   O K . 
 
         R e f e r e n c e   A W - E r r o r . t x t   f i l e . 
 
 
 
 {O
 
     V C : 
 
         A _ S e t _ S y s s e t t i n g ( 2 ,   0 ,   1 2 0 0 ,   1 ,   2 ) ; 
 
     V B :   V B A :   V B . n e t : 
 
         C a l l   A _ S e t _ S y s s e t t i n g ( 2 ,   0 ,   1 2 0 0 ,   1 ,   2 ) 
 
 
 
 f    P  A _ S e t _ S y s s e t t i n g   Qxep͑Mn0
 
 
 
 * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * 
 
 A _ S e t _ U n i t ( ) 
 
 = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = 
 
 R    -[^ϑUMOpTblQS0
 
 
 
 l
 
     V C : 
 
         i n t   A _ S e t _ U n i t ( c h a r   u n i t ) ; 
 
     V B :   V B A : 
 
         D e c l a r e   F u n c t i o n   A _ S e t _ U n i t ( B y V a l   u n i t   A s   B y t e )   A s   L o n g 
 
     V B . n e t : 
 
         D e c l a r e   F u n c t i o n   A _ S e t _ U n i t ( B y V a l   u n i t   A s   B y t e )   A s   I n t e g e r 
 
 
 
 Sxe
 
         u n i t ; 
 
             ^ϑUMOYNh
 
             + - - - - - - + - - - - - - - - - - - - - - - - - - - - - - - - - - - + 
 
             |   u n i t   |   ^ϑ                                            | 
 
             + - - - - - - + - - - - - - - - - - - - - - - - - - - - - - - - - - - + 
 
             |     m       |   lQS                                            | 
 
             + - - - - - - + - - - - - - - - - - - - - - - - - - - - - - - - - - - + 
 
             |     n       |   T                                            | 
 
             + - - - - - - + - - - - - - - - - - - - - - - - - - - - - - - - - - - + 
 
 
 
 PV<P    0   - >   O K . 
 
             R e f e r e n c e   A W - E r r o r . t x t   f i l e . 
 
 
 
 {O
 
     V C : 
 
         A _ S e t _ U n i t ( ' n ' ) ; 
 
     V B :   V B A :   V B . n e t : 
 
         C a l l   A _ S e t _ U n i t ( A s c ( " n " ) ) 
 
 
 
 f    P  A _ S e t _ U n i t   Qxe-[^ϑUMOpTblQS0
 
 
 
 * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * 
 
 A _ S e t _ G a p ( ) 
 
 = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = 
 
 R    -[  G a p   vw^0
 
 
 
 l
 
     V C : 
 
         i n t   A _ S e t _ G a p ( i n t   g a p ) ; 
 
     V B :   V B A : 
 
         D e c l a r e   F u n c t i o n   A _ S e t _ G a p ( B y V a l   g a p   A s   L o n g )   A s   L o n g 
 
     V B . n e t : 
 
         D e c l a r e   F u n c t i o n   A _ S e t _ G a p ( B y V a l   g a p   A s   I n t e g e r )   A s   I n t e g e r 
 
 
 
 Sxe
 
         g a p ; 
 
             {
W:   0   ^  3 6   m m 0
 
 
 
 PV<P
 
         0   - >   O K . 
 
         R e f e r e n c e   A W - E r r o r . t x t   f i l e . 
 
 
 
 {O
 
     V C : 
 
         A _ S e t _ G a p ( 0 ) ; 
 
     V B :   V B A :   V B . n e t : 
 
         C a l l   A _ S e t _ G a p ( 0 ) 
 
 
 
 f    P  A _ S e t _ U n i t   QxeS-[  G a p   v[^0
 
 
 
 * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * 
 
 A _ S e t _ L o g i c ( ) 
 
 = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = 
 
 R    -[S}vR0
 
 
 
 l
 
     V C : 
 
         i n t   A _ S e t _ L o g i c ( i n t   L o g i c ) ; 
 
     V B :   V B A : 
 
         D e c l a r e   F u n c t i o n   A _ S e t _ L o g i c ( B y V a l   L o g i c   A s   L o n g )   A s   L o n g 
 
     V B . n e t : 
 
         D e c l a r e   F u n c t i o n   A _ S e t _ L o g i c ( B y V a l   L o g i c   A s   I n t e g e r )   A s   I n t e g e r 
 
 
 
 Sxe
 
         l o g i c ; 
 
             0 : pSh_j-<P0
 
             1 : ͑uNS}v0
 
             2 : ͑uN
NS}v0
 
 
 
 PV<P
 
         0   - >   O K . 
 
         R e f e r e n c e   A W - E r r o r . t x t   f i l e . 
 
 
 
 {O
 
     V C : 
 
         A _ S e t _ L o g i c ( 1 ) ; 
 
     V B :   V B A :   V B . n e t : 
 
         C a l l   A _ S e t _ L o g i c ( 1 ) 
 
 
 
 f    P  A _ S e t _ L o g i c   QxeS-[S}vR0
 
 
 
 * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * 
 
 A _ S e t _ P r o c e s s D l g ( ) 
 
 = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = 
 
 R    _Ubܕ2^
\qFh0
 
 
 
 l
 
     V C : 
 
         i n t   A _ S e t _ P r o c e s s D l g ( i n t   n S h o w ) ; 
 
     V B :   V B A : 
 
         D e c l a r e   F u n c t i o n   A _ S e t _ P r o c e s s D l g ( B y V a l   n S h o w   A s   L o n g )   A s   L o n g 
 
     V B . n e t : 
 
         D e c l a r e   F u n c t i o n   A _ S e t _ P r o c e s s D l g ( B y V a l   n S h o w   A s   I n t e g e r )   A s   I n t e g e r 
 
 
 
 Sxe
 
         n S h o w ; 
 
             0   - >   ܕ0
 
             1   - >   _U0
 
 
 
 PV<P
 
         0   - >   O K . 
 
         R e f e r e n c e   A W - E r r o r . t x t   f i l e . 
 
 
 
 {O
 
     V C : 
 
         A _ S e t _ P r o c e s s D l g ( 1 ) ; 
 
     V B :   V B A :   V B . n e t : 
 
         C a l l   A _ S e t _ P r o c e s s D l g ( 1 ) 
 
 
 
 f    P  A _ S e t _ P r o c e s s D l g   QxeSܕ2^
\qFh0
 
 
 
 * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * 
 
 A _ S e t _ E r r o r D l g ( ) 
 
 = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = 
 
 R    _Ubܕ͑fbOUz0
 
 
 
 l
 
     V C : 
 
         i n t   A _ S e t _ E r r o r D l g ( i n t   n S h o w ) ; 
 
     V B :   V B A : 
 
         D e c l a r e   F u n c t i o n   A _ S e t _ E r r o r D l g ( B y V a l   n S h o w   A s   L o n g )   A s   L o n g 
 
     V B . n e t : 
 
         D e c l a r e   F u n c t i o n   A _ S e t _ E r r o r D l g ( B y V a l   n S h o w   A s   I n t e g e r )   A s   I n t e g e r 
 
 
 
 Sxe
 
         n S h o w ; 
 
             0   - >   ܕ0
 
             1   - >   _U0
 
 
 
 PV<P
 
         0   - >   O K . 
 
         R e f e r e n c e   A W - E r r o r . t x t   f i l e . 
 
 
 
 {O
 
     V C : 
 
         A _ S e t _ E r r o r D l g ( 1 ) ; 
 
     V B :   V B A :   V B . n e t : 
 
         C a l l   A _ S e t _ E r r o r D l g ( 1 ) 
 
 
 
 f    P  A _ S e t _ E r r o r D l g   QxeSܕ͑fbOUz0
 
 
 
 * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * 
 
 A _ S e t _ L a b e l V e r ( ) 
 
 = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = 
 
 R    -[}5_[^0( F o r   R 4 0 0 ) 
 
 
 
 l
 
     V C : 
 
         i n t   A _ S e t _ L a b e l V e r ( i n t   c e n t i I n c h ) ; 
 
     V B :   V B A : 
 
         D e c l a r e   F u n c t i o n   A _ S e t _ L a b e l V e r ( B y V a l   c e n t i I n c h   A s   L o n g )   A s   L o n g 
 
     V B . n e t : 
 
         D e c l a r e   F u n c t i o n   A _ S e t _ L a b e l V e r ( B y V a l   c e n t i I n c h   A s   I n t e g e r )   A s   I n t e g e r 
 
 
 
 Sxe
 
         c e n t i I n c h ; 
 
             }5_[^0UMO  :   0 . 0 1   T0
 
 
 
 PV<P
 
         0   - >   O K . 
 
         R e f e r e n c e   A W - E r r o r . t x t   f i l e . 
 
 
 
 {O
 
     V C : 
 
         A _ S e t _ L a b e l V e r ( 4 0 0 ) ; 
 
     V B :   V B A :   V B . n e t : 
 
         C a l l   A _ S e t _ L a b l e V e r ( 4 0 0 ) 
 
 
 
 f    P  A _ S e t _ L a b e l V e r   QxeS-[  R 4 0 0   }5_[^0
 
 
 
 * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * 
 
 A _ C l e a r _ M e m o r y E x ( ) 
 
 = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = 
 
 R    nd  P r i n t e r   gQ  R A M   b  F l a s h   M e m o r y   vǌe0
 
 
 
 l
 
     V C : 
 
         v o i d   A _ C l e a r _ M e m o r y E x ( i n t   n M o d e ) ; 
 
     V B :   V B A : 
 
         D e c l a r e   S u b   A _ C l e a r _ M e m o r y E x ( B y V a l   n M o d e   A s   L o n g ) 
 
     V B . n e t : 
 
         D e c l a r e   S u b   A _ C l e a r _ M e m o r y E x ( B y V a l   n M o d e   A s   I n t e g e r ) 
 
 
 
 Sxe
 
         n M o d e ; 
 
             0   - - >   P r i n t e r -<P0
 
             1   - - >   R A M 0
 
             2   - - >   F l a s h   M e m o r y 0
 
 
 
 {O
 
     V C : 
 
         A _ C l e a r _ M e m o r y E x ( 1 ) ; 
 
     V B :   V B A :   V B . n e t : 
 
         C a l l   A _ C l e a r _ M e m o r y E x ( 1 ) 
 
 
 
 f    P  A _ C l e a r _ M e m o r y E x   QxeSc[nd  P r i n t e r   gQ  R A M   b  F l a s h   M e m o r y   vWb_0ߎ
 
         ԚW[b_0VpWb_0W[b_g Nv/}Mz(W  m e m o r y    b  o v e r f l o w ck8^BfQxe(W
 
         P r i n t _ O u t ( )   KNMRQ0vu  m e m o r y   EQncNP r i n t e r   1\g*RdHQMR	eQv
 
         Wb_TW[b_pMQ|vu
Nvuv*RdHQ(W  A _ P r i n t _ O u t ( )   KNMRQ0
 
 
 
 * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * 
 
 A _ S e t _ M i r r o r ( ) 
 
 = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = 
 
 R    _Ubܕ\!j_0
 
 
 
 l
 
     V C : 
 
         v o i d   A _ S e t _ M i r r o r ( v o i d ) ; 
 
     V B :   V B A :   V B . n e t : 
 
         D e c l a r e   S u b   A _ S e t _ M i r r o r ( ) 
 
 
 
 {O
 
     V C : 
 
         A _ S e t _ M i r r o r ( ) ; 
 
     V B :   V B A :   V B . n e t : 
 
         C a l l   A _ S e t _ M i r r o r ( ) 
 
 
 
 f    P  A _ S e t _ M i r r o r Qxeg_U\!j_O_(WvQKN_|TSvRpSeW[0hx0WHhI{vܕQxeS
 
         "uuSIRpSvHeg(WvTz_-NQ!k|TSA _ S e t _ M i r r o r QxeGRSܕ\RvQ
 
         _@b|TSvRpSQxevg9eV N,RpS!j_dkQxe(Wz_SO Bl͑|TS0
 
                                             
 
 * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * 
 
 A _ B a r 2 d _ R S S ( ) 
 
 = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = 
 
 R    pSQ NP  R S S   B a r c o d e 0
 
 
 
 l
 
     V C : 
 
         i n t   A _ B a r 2 d _ R S S ( i n t   x ,   i n t   y ,   i n t   o r i ,   i n t   r a t i o ,   i n t   h e i g h t ,   c h a r   r t y p e , 
 
             i n t   m u l t ,   i n t   s e g ,   L P C T S T R   d a t a 1 ,   L P C T S T R   d a t a 2 ) ; 
 
     V B :   V B A : 
 
         D e c l a r e   F u n c t i o n   A _ B a r 2 d _ R S S ( B y V a l   x   A s   L o n g ,   B y V a l   y   A s   L o n g ,   B y V a l   o r i   A s   L o n g ,   _ 
 
             B y V a l   r a t i o   A s   L o n g ,   B y V a l   h e i g h t   A s   L o n g ,   B y V a l   r t y p e   A s   B y t e ,   _ 
 
             B y V a l   m u l t   A s   L o n g ,   B y V a l   s e g   A s   L o n g ,   B y V a l   d a t a 1   A s   S t r i n g ,   _ 
 
             B y V a l   d a t a 2   A s   S t r i n g )   A s   L o n g 
 
     V B . n e t : 
 
         D e c l a r e   F u n c t i o n   A _ B a r 2 d _ R S S ( B y V a l   x   A s   I n t e g e r ,   B y V a l   y   A s   I n t e g e r ,   _ 
 
             B y V a l   o r i   A s   I n t e g e r ,   B y V a l   r a t i o   A s   I n t e g e r ,   B y V a l   h e i g h t   A s   I n t e g e r ,   _ 
 
             B y V a l   r t y p e   A s   B y t e ,   B y V a l   m u l t   A s   I n t e g e r ,   B y V a l   s e g   A s   I n t e g e r ,   _ 
 
             B y V a l   d a t a 1   A s   S t r i n g ,   B y V a l   d a t a 2   A s   S t r i n g )   A s   I n t e g e r 
 
 
 
 Sxe
 
         x ; 
 
             X   ^j0( 1 0 0   =   1   T) 
 
         y ; 
 
             Y   ^j0( 1 0 0   =   1   T) 
 
         o r i ; 
 
             RpSeT01 : 0  02 : 9 0  03 : 1 8 0  04 : 2 7 0  
 
         r a t i o ; 
 
             N a r r o w   b a r W i d t h   b a r v>e'Y
Ps{
W1 ~ 9 ( -<P: 2 ) 0
 
         h e i g h t ; 
 
             hxؚ^0
 
             jnhx g\ؚ^P6R: 
 
             R S S - 1 4                                             - >   3 3   p i x e l s 
 
             R S S   L i m i t e d                                   - >   1 0   p i x e l s 
 
             R S S   S t a c k e d                                   - >   1 3   p i x e l s 
 
             R S S   T r u n c a t e d                               - >   1 3   p i x e l s 
 
             R S S   S t a c k e d   O m n i d i r e c t i o n a l   - >   6 9   p i x e l s 
 
             R S S   E x p a n d e d                                 - >   3 4   p i x e l s 
 
         r t y p e ; 
 
             hxW%R0
 
             R   - >   R S S - 1 4   
 
             L   - >   R S S   L i m i t e d 
 
             S   - >   R S S   S t a c k e d 
 
             T   - >   R S S   T r u n c a t e d 
 
             D   - >   R S S   S t a c k e d   O m n i d i r e c t i o n a l 
 
             E   - >   R S S   E x p a n d e d 
 
         m u l t ; 
 
             W }>e'Y
Ps{
W1 ~ 9 ( -<P: 1 ) 0
 
         s e g ; 
 
             kRhxSS+Tv g'Yǌe@SJXxeϑS(WO(uR S S   E x p a n d e d hxBf	gHe
 
             (WvQ[^WvR S S hx-NGRp!qHeSxe{
Wp2 ~ 2 2 -<Pp2 2 Ndk<P_ pvPxe0
 
         d a t a 1 ; 
 
             xeW[W%Rvǌe0
 
         d a t a 2 ; 
 
             N}hxvǌe0
 
 
 
         ;: 
 
             1 . ' h e i g h t '   =   0   = >   [hxؚ^  =   ' d e f a u l t '   *   ' r a t i o '   *   ' m u l t ' 
 
                 ' h e i g h t '   =   vQ[xe<P  = >   [hxؚ^  =   ' h e i g h t ' 
 
             2 .   hxؚ^vUMO1u< S T X > n < S T X > m cNzl[. 
 
 
 
 PV<P
 
         0   - >   O K . 
 
         R e f e r e n c e   A W - E r r o r . t x t   f i l e . 
 
 
 
 {O
 
     V C : 
 
         A _ B a r 2 d _ R S S ( 1 0 0 ,   1 0 0 ,   1 ,   2 ,   3 3 ,   ' R ' ,   1 ,   4 ,   " 1 2 3 4 5 6 7 8 9 0 " ,   " R S S   c o d e " ) ; 
 
     V B :   V B A :   V B . n e t : 
 
         C a l l   A _ B a r 2 d _ R S S ( 1 0 0 ,   1 0 0 ,   1 ,   2 ,   3 3 ,   A s c ( " R " ) ,   1 ,   4 ,   " 1 2 3 4 5 6 7 8 9 0 " ,   " R S S   c o d e " ) 
 
 
 
 f    P  A _ B a r 2 d _ R S S   QxeSNRpSQ NP  R S S   B a r c o d e 0
 
 
 
 * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * 
 
 A _ B a r 2 d _ Q R _ M ( ) 
 
 A _ B a r 2 d _ Q R _ A ( ) 
 
 = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = 
 
 R    RpS  Q R   hx0
 
 
 
 l
 
     V C : 
 
         i n t   A _ B a r 2 d _ Q R _ M ( i n t   x ,   i n t   y ,   i n t   o r i ,   c h a r   m u l t ,   i n t   v a l u e ,   i n t   m o d e l , 
 
             c h a r   e r r o r ,   i n t   m a s k ,   c h a r   d i n p u t ,   c h a r   m o d e ,   i n t   n u m e r i c ,   L P C T S T R   d a t a ) ; 
 
         i n t   A _ B a r 2 d _ Q R _ A ( i n t   x ,   i n t   y ,   i n t   o r i ,   c h a r   m u l t ,   i n t   v a l u e ,   c h a r   m o d e , 
 
             i n t   n u m e r i c ,   L P C T S T R   d a t a ) ; 
 
     V B :   V B A : 
 
         D e c l a r e   F u n c t i o n   A _ B a r 2 d _ Q R _ M ( B y V a l   x   A s   L o n g ,   B y V a l   y   A s   L o n g ,   _ 
 
             B y V a l   o r i   A s   L o n g ,   B y V a l   m u l t   A s   B y t e ,   B y V a l   v a l u e   A s   L o n g ,   _ 
 
             B y V a l   m o d e l   A s   L o n g ,   B y V a l   e r r   A s   B y t e ,   B y V a l   m a s k   A s   L o n g ,   _ 
 
             B y V a l   d i n p u t   A s   B y t e ,   B y V a l   m o d e   A s   B y t e ,   B y V a l   n u m e r i c   A s   L o n g ,   _ 
 
             B y V a l   d a t a   A s   S t r i n g )   A s   L o n g 
 
         D e c l a r e   F u n c t i o n   A _ B a r 2 d _ Q R _ A ( B y V a l   x   A s   L o n g ,   B y V a l   y   A s   L o n g ,   _ 
 
             B y V a l   o r i   A s   L o n g ,   B y V a l   m u l t   A s   B y t e ,   B y V a l   v a l u e   A s   L o n g ,   _ 
 
             B y V a l   m o d e   A s   B y t e ,   B y V a l   n u m e r i c   A s   L o n g ,   B y V a l   d a t a   A s   S t r i n g )   A s   L o n g 
 
     V B . n e t : 
 
         D e c l a r e   F u n c t i o n   A _ B a r 2 d _ Q R _ M ( B y V a l   x   A s   I n t e g e r ,   B y V a l   y   A s   I n t e g e r ,   _ 
 
             B y V a l   o r i   A s   I n t e g e r ,   B y V a l   m u l t   A s   B y t e ,   B y V a l   v a l u e   A s   I n t e g e r ,   _ 
 
             B y V a l   m o d e l   A s   I n t e g e r ,   B y V a l   e r r   A s   B y t e ,   B y V a l   m a s k   A s   I n t e g e r ,   _ 
 
             B y V a l   d i n p u t   A s   B y t e ,   B y V a l   m o d e   A s   B y t e ,   B y V a l   n u m e r i c   A s   I n t e g e r ,   _ 
 
             B y V a l   d a t a   A s   S t r i n g )   A s   I n t e g e r 
 
         D e c l a r e   F u n c t i o n   A _ B a r 2 d _ Q R _ A ( B y V a l   x   A s   I n t e g e r ,   B y V a l   y   A s   I n t e g e r ,   _ 
 
             B y V a l   o r i   A s   I n t e g e r ,   B y V a l   m u l t   A s   B y t e ,   B y V a l   v a l u e   A s   I n t e g e r ,   _ 
 
             B y V a l   m o d e   A s   B y t e ,   B y V a l   n u m e r i c   A s   I n t e g e r ,   B y V a l   d a t a   A s   S t r i n g )   A s   I n t e g e r 
 
 
 
 Sxe
 
         x ; 
 
             X   ^j0
 
         y ; 
 
             Y   ^j0
 
         o r i ; 
 
             RpSeT0  1 : 0  02 : 9 0  03 : 1 8 0  04 : 2 7 0  
 
         m u l t ; 
 
             4ls^Wv>e'Y
Ps{
W:   1 ~ 9 ,   A ~ Z ,   a ~ z 0
 
         v a l u e ; 
 
             {
W:   0 0 0 ~ 9 9 9   
 
         m o d e ; 
 
             _RYNh
 
             + - - - - + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + 
 
             | m o d e |                       Rf                                    | 
 
             + - - - - + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + 
 
             |   A     | 
\xeW[RXR_.                                     | 
 
             + - - - - + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + 
 
             |   B     | 
\W[kRXR_.                                     | 
 
             + - - - - + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + 
 
             |   C     | 
\xeW[Rn\_.                                     | 
 
             + - - - - + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + 
 
             |   D     | 
\W[kRn\_.                                     | 
 
             + - - - - + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + 
 
             |   N     | !qNUOR.                                                 | 
 
             + - - - - + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + 
 
         n u m e r i c ; 
 
             RXRbn\_ϑ{
W0 ~ 9 9 0
 
         d a t a ; 
 
             ǌeW[2N0
 
             KbR<h_Sxe: ( -[
N&{{
WGRpSh_jgc(u-<PRpS) 
 
         m o d e l ; 
 
             Q R hx!j_{
W: 1 , 2   ( -<P:   2 ) 0
 
         e r r o r ; 
 
             /!hckI{}0(  d i n p u t -[ckxMb	gHe) 
 
             H   =   U l t r a   r e l i a b i l i t y   l e v e l   ( 3 0 % ) 
 
             Q   =   H i g h   r e l i a b i l i t y   l e v e l   ( 2 5 % ) 
 
             M   =   S t a n d a r d   r e l i a b i l i t y   l e v e l   ( 1 5 % ) 
 
             L   =   H i g h   d e n s i t y   l e v e l   ( 7 % ) 
 
             ( -<P:   M ) 
 
         m a s k ; 
 
             ni^xe0(  e r r o r d i n p u t -[ckxMb	gHe) 
 
             0 ~ 7   =   M a s k   0   ~   M a s k   7 
 
             8   =   N o   m a s k 
 
             ( -<P:   Rxd) 
 
         d i n p u t ; 
 
             ǌe8eQ!j_0(  e r r o r -[ckxMb	gHe) 
 
             A   =   R-[,   A S C I I 
 
             a   =   R,   h e x - A S C I I 
 
             M   =   KbR-[,   A S C I I 
 
             m   =   KbR,   h e x - A S C I I       
 
             ( -<P:   A )                                         
 
             la: (WKbR!j_NǌeW[2NvwYW[CQ_/fNRW[CQKN N
 
             N   =   xeW[ǌe  
 
             A   =   W[kxeW[ǌe
 
             B x x x x   =   8 MOCQD}!j_" x x x x "   NhW[CQxeϑ0
 
                             ( !|Ԛ-NebA~Ԛ-Ne NPW[NhiQPW[CQ) 
 
             K = "oW[ǌe
 
 
 
 PV<P
 
         0   - >   O K . 
 
         R e f e r e n c e   A W - E r r o r . t x t   f i l e . 
 
 
 
 {O
 
     V C : 
 
         A _ B a r 2 d _ Q R _ M ( 1 0 0 ,   1 0 0 ,   4 ,   ' 6 ' ,   1 0 ,   2 ,   ' M ' ,   1 ,   ' A ' ,   ' A ' ,   4 ,   " N 1 2 3 4 5 6 " ) ; 
 
         A _ B a r 2 d _ Q R _ A ( 1 0 0 ,   1 0 0 ,   4 ,   ' 6 ' ,   1 0 ,   ' A ' ,   4 ,   " 1 2 3 4 5 6 " ) ; 
 
     V B :   V B A :   V B . n e t : 
 
         C a l l   A _ B a r 2 d _ Q R _ M ( 1 0 0 ,   1 0 0 ,   4 ,   A s c ( " 6 " ) ,   1 0 ,   2 ,   A s c ( " M " ) ,   1 ,   A s c ( " A " ) ,   _ 
 
             A s c ( " A " ) ,   4 ,   " N 1 2 3 4 5 6 " ) 
 
         C a l l   A _ B a r 2 d _ Q R _ A ( 1 0 0 ,   1 0 0 ,   4 ,   A s c ( " 6 " ) ,   1 0 ,   A s c ( " A " ) ,   4 ,   " 1 2 3 4 5 6 " ) 
 
 
 
 f    A _ B a r 2 d _ Q R _ M A _ B a r 2 d _ Q R _ A QxeSNRpSQ R hx0
 
 
 
 * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * 
 
 A _ S e t _ E n c r y p t i o n K e y ( ) 
 
 = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = 
 
 R:   -[R[pSv<P0
 
 
 
 l: 
 
     V C : 
 
         i n t   A _ S e t _ E n c r y p t i o n K e y ( c h a r   e n c r y p t i o n K e y [ 1 6 ] ) ; 
 
     V B :   V B A : 
 
         D e c l a r e   F u n c t i o n   A _ S e t _ E n c r y p t i o n K e y ( B y V a l   e n c r y p t i o n K e y   A s   S t r i n g )   A s   L o n g 
 
     V B . n e t : 
 
         D e c l a r e   F u n c t i o n   A _ S e t _ E n c r y p t i o n K e y ( B y V a l   e n c r y p t i o n K e y   A s   S t r i n g )   A s   I n t e g e r 
 
 
 
 Sxe: 
 
         e n c r y p t i o n K e y ; 
 
             R[pSv<P,    1 6 PW[CQ,   vQW[CQv{
Wp0 x 2 1 0 x 7 E 0
 
 
 
 PV<P: 
 
         0   - >   O K . 
 
         R e f e r e n c e   A W - E r r o r . t x t   f i l e . 
 
 
 
 {O: 
 
     V C : 
 
         A _ S e t _ E n c r y p t i o n K e y ( " k e y - 1 2 3 4 5 6 7 8 9 0 0 0 " ) ; 
 
     V B :   V B A :   V B . n e t : 
 
         C a l l   A _ S e t _ E n c r y p t i o n K e y ( " k e y - 1 2 3 4 5 6 7 8 9 0 0 0 " ) 
 
 
 
 f:     dkQ_(uO-[R[pSv<P,   NgzsSPǌe,   &N\vQ<P2QX[pSh_j-N0
 
 
 
 * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * 
 
 A _ C h e c k _ E n c r y p t i o n K e y ( ) 
 
 = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = 
 
 R    xR[pSvckx'`0
 
 
 
 l
 
     V C : 
 
         i n t   A _ C h e c k _ E n c r y p t i o n K e y ( c h a r   d e c o d e K e y [ 8 ] ,   c h a r   e n c r y p t i o n K e y [ 1 6 ] ,   D W O R D   d w T i m e o u t m s ) ; 
 
     V B :   V B A : 
 
         D e c l a r e   F u n c t i o n   A _ C h e c k _ E n c r y p t i o n K e y ( B y V a l   d e c o d e K e y   A s   S t r i n g ,   B y V a l   e n c r y p t i o n K e y   A s   S t r i n g ,   _ 
 
             B y V a l   d w T i m e o u t m s   A s   L o n g )   A s   L o n g 
 
     V B . n e t : 
 
         D e c l a r e   F u n c t i o n   A _ C h e c k _ E n c r y p t i o n K e y ( B y V a l   d e c o d e K e y   A s   S t r i n g ,   B y V a l   e n c r y p t i o n K e y   A s   S t r i n g ,   _ 
 
             B y V a l   d w T i m e o u t m s   A s   U L o n g )   A s   I n t e g e r 
 
 
 
 Sxe
 
         d e c o d e K e y ; 
 
             ㉼xpSv<P,    8 PW[CQ,   vQW[CQv{
Wp0 x 2 1 0 x 7 E 0
 
         e n c r y p t i o n K e y ; 
 
             R[pSv<P,    1 6 PW[CQ,   vQW[CQv{
Wp0 x 2 1 0 x 7 E 0
 
         d w T i m e o u t m s ; 
 
             xeBf,   _N1\/fSǌe gwvBf,   UMOpm s 0
 
 
 
 PV<P
 
         0   - >   O K . 
 
         R e f e r e n c e   A W - E r r o r . t x t   f i l e . 
 
 
 
 {O
 
     V C : 
 
         i n t   r e t ; 
 
         r e t   =   A _ C h e c k _ E n c r y p t i o n K e y ( " t e s t - p a r " ,   " k e y - 1 2 3 4 5 6 7 8 9 0 0 0 " ,   1 0 0 0 ) ; / / 1   s e c o n d . 
 
     V B :   V B A : 
 
         D i m   r e t   A s   L o n g 
 
         r e t   =   A _ C h e c k _ E n c r y p t i o n K e y ( " t e s t - p a r " ,   " k e y - 1 2 3 4 5 6 7 8 9 0 0 0 " ,   1 0 0 0 )       ' 1   s e c o n d . 
 
     V B . n e t : 
 
         D i m   r e t   A s   I n t e g e r 
 
         r e t   =   A _ C h e c k _ E n c r y p t i o n K e y ( " t e s t - p a r " ,   " k e y - 1 2 3 4 5 6 7 8 9 0 0 0 " ,   1 0 0 0 )       ' 1   s e c o n d . 
 
 
 
 f    dkQ_(uOxR[pSvckx'`0\  d e c o d e K e y   v<PPpSh_j_,   
 
         TpSh_j-NvR[pSZPK{_VPK{P}g,   6q_T  d e c o d e K e y   S  e n c r y p t i o n K e y   
 
         v<PK{_vP}gZPk
\,   ww/f&TvT0
 
 
 
 * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * 
 
 A _ S e t _ C o m m T i m e o u t ( ) 
 
 = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = 
 
 R-[OvBf. 
 
 
 
 l
 
     V C : 
 
         v o i d   A _ S e t _ C o m m T i m e o u t ( i n t   R e a d T o t a l T i m e o u t C o n s t a n t ,   i n t   W r i t e T o t a l T i m e o u t C o n s t a n t ) ; 
 
     V B :   V B A : 
 
         D e c l a r e   S u b   A _ S e t _ C o m m T i m e o u t ( B y V a l   R e a d T o t a l T i m e o u t C o n s t a n t   A s   L o n g ,   _ 
 
             B y V a l   W r i t e T o t a l T i m e o u t C o n s t a n t   A s   L o n g ) 
 
     V B . n e t : 
 
         D e c l a r e   S u b   A _ S e t _ C o m m T i m e o u t ( B y V a l   R e a d T o t a l T i m e o u t C o n s t a n t   A s   I n t e g e r ,   _ 
 
             B y V a l   W r i t e T o t a l T i m e o u t C o n s t a n t   A s   I n t e g e r ) 
 
 
 
 Sxe
 
         R e a d T o t a l T i m e o u t C o n s t a n t ; 
 
             Sv>BfBf;   UMO  :   1   m s .   - 1   /f!qz'Y. 
 
         W r i t e T o t a l T i m e o u t C o n s t a n t ; 
 
             [eQv>BfBf;   UMO  :   1   m s .   - 1   /f!qz'Y. 
 
 
 
 {O
 
     V C : 
 
         A _ S e t _ C o m m T i m e o u t ( 0 ,   - 1 ) ; 
 
         A _ C r e a t e P r n ( 1 1 ,   N U L L ) ;   / / U S B 
 
     V B :   V B A :   V B . n e t : 
 
         C a l l   A _ S e t _ C o m m T i m e o u t ( 0 ,   - 1 ) 
 
         C a l l   A _ C r e a t e P r n ( 1 1 ,   n u l l )   ' U S B 
 
 
 
 f    dkQ_(uO-[S/ [eQv>BfBf.   
 
         Yg`O O(udkQ_,   dkQ_ (W  A _ C r e a t e P r n ( )   Q_MRWL. 
 
 
 
 * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * 
 
 A _ G e t _ C o m m T i m e o u t ( ) 
 
 = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = 
 
 RS_OvBf. 
 
 
 
 l
 
     V C : 
 
         v o i d   A _ G e t _ C o m m T i m e o u t ( i n t   * R e a d T o t a l T i m e o u t C o n s t a n t ,   i n t   * W r i t e T o t a l T i m e o u t C o n s t a n t ) ; 
 
     V B :   V B A : 
 
         D e c l a r e   S u b   A _ G e t _ C o m m T i m e o u t ( B y R e f   R e a d T o t a l T i m e o u t C o n s t a n t   A s   L o n g ,   _ 
 
             B y R e f   W r i t e T o t a l T i m e o u t C o n s t a n t   A s   L o n g ) 
 
     V B . n e t : 
 
         D e c l a r e   S u b   A _ G e t _ C o m m T i m e o u t ( B y R e f   R e a d T o t a l T i m e o u t C o n s t a n t   A s   I n t e g e r ,   _ 
 
             B y R e f   W r i t e T o t a l T i m e o u t C o n s t a n t   A s   I n t e g e r ) 
 
 
 
 Sxe
 
         R e a d T o t a l T i m e o u t C o n s t a n t ; 
 
             r e a d   t i m e o u t ;   u n i t   :   1   m s .   - 1   i s   i n f i n i t e . 
 
         W r i t e T o t a l T i m e o u t C o n s t a n t ; 
 
             w r i t e   t i m e o u t ;   u n i t   :   1   m s .   - 1   i s   i n f i n i t e . 
 
 
 
 {O
 
     V C : 
 
         i n t   R e a d T o t a l T i m e o u t C o n s t a n t ,   W r i t e T o t a l T i m e o u t C o n s t a n t ; 
 
         A _ G e t _ C o m m T i m e o u t ( & R e a d T o t a l T i m e o u t C o n s t a n t ,   & W r i t e T o t a l T i m e o u t C o n s t a n t ) ; 
 
     V B :   V B A :   V B . n e t : 
 
         D i m   R e a d T o t a l T i m e o u t C o n s t a n t ,   W r i t e T o t a l T i m e o u t C o n s t a n t   A s   L o n g 
 
         C a l l   A _ G e t _ C o m m T i m e o u t ( R e a d T o t a l T i m e o u t C o n s t a n t ,   W r i t e T o t a l T i m e o u t C o n s t a n t ) 
 
 
 
 * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * 
 
 A _ S e t _ L a b e l F o r S m a r t P r i n t ( ) 
 
 = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = 
 
 R  -[  S m a r t   P r i n t   -N@b vǌ
. 
 
 
 
 l
 
     V C : 
 
         i n t   A _ S e t _ L a b e l F o r S m a r t P r i n t ( i n t   l a b l e n g t h ,   i n t   g a p l e n g t h ) ; 
 
     V B :   V B A : 
 
         D e c l a r e   F u n c t i o n   A _ S e t _ L a b e l F o r S m a r t P r i n t ( B y V a l   l a b l e n g t h   A s   L o n g ,   _ 
 
             B y V a l   g a p l e n g t h   A s   L o n g )   A s   L o n g 
 
     V B . n e t : 
 
         D e c l a r e   F u n c t i o n   A _ S e t _ L a b e l F o r S m a r t P r i n t ( B y V a l   l a b l e n g t h   A s   I n t e g e r ,   _ 
 
             B y V a l   g a p l e n g t h   A s   I n t e g e r )   A s   I n t e g e r 
 
             
 
 Sxe
 
         l a b l e n g t h ; 
 
             jd|w^0UMO  :   0 . 1   lQS0
 
         g a p l e n g t h ; 
 
             G A P   w^0UMO  :   0 . 1   lQS0
 
 
 
 PV<P
 
         0   - >   O K . 
 
         R e f e r e n c e   A W - E r r o r . t x t   f i l e . 
 
 
 
 {O
 
     V C : 
 
         A _ S e t _ L a b e l F o r S m a r t P r i n t ( 7 6 2 ,   3 0 ) ; 
 
     V B :   V B A :   V B . n e t : 
 
         C a l l   A _ S e t _ L a b e l F o r S m a r t P r i n t ( 7 6 2 ,   3 0 ) 
 
 
 
 f    P  A _ S e t _ L a b e l F o r S m a r t P r i n t   Qxe(uO-[  S m a r t   P r i n t   @b vjd|w^S  G A P   w^iQPǌ
0
 
 